location searching algorithm fixed, O(N^2log(N)) -> O(Nlog(N))