implements search ordered by location