updated to include cordova dialogs plugin