added cordova support