refactor gpstracking