locations refactoring