refactoring, added cordova gps api