Implemented rangeSearch