finish refactoring util to use location objects