major restructuring of client code