Added search history function