Add geolocation function