added geofencing functionality