refactor location activity