implement lower_bound, upper_bound, count, etc.