Lower And Upper Bound Function