Added functions lowerBound and upperBound