updated to work with my version of cordova