prepare client