wrapper functions for undo and redo