client code clean up