refactoring UI and geolocation