add functions for undo and redo