library of client functions for use with cordova