adding an 'undo last entry' feature