added test for undo