added init client code