2 versions of rangeSearch