updated GPS code after merge