add lower_bound and upper_bound function