refactored the riak client module