added geofencing and pretty print