Adding code for search.