added diagrams for undo