Implemented location functionality