update for search function