improve the client code