add categories and handle show search result.