rewriten client tests