working on undo/redo functions