client code cleanup