implemented get_location method