added geolocation; fixed some bugs