almost completed save/redo/undo