cordova working functions