refactored to test_location