refactored gps service