setting up client code