search for a range, lower and upper bound