refactoring geofence