location range util functions