adding unit test version of client functions