add helper functions to cordova plugin