cleanup client code