fixed bugs and implemented getting geolocation position