better location alg