modify for cordova