move resetSearchResult function to inside showResult