expanded the geolocation function a bit