add search function in the history page