geolocate
refactored and merged
test and some refactoring