client code setup