refactored locationClass