formatted gps function