Implemented rangeSearch.