added functionality to upload location data to server