init client code