implemented undo&redo for deletion