Updated gps code