refactor locations to remove a bit of redundancy