move geolocation to factory, resolve with a promise