updated client code