porting to cordova 3.0 spec