refactored location