making undo and redo work for clean