search result function working on it