undo/redo almost works