change client api
add tests