add search for a range (O(n) solution)