updated to follow the cordova spec