add undo ability to search