added code keep track of the search history in the form