refactor _geolocation code to reuse code from Instance model