updated JS with geolocation and local storage