updateLocation is now a working function