added location services logic