refactored location cordinates method