implemented getGeolocation method