functions to do geolocation functionalities