moved geolocation functions to bottom and added loading screen