added code to fetch current location using geolocation API