changed getting data in searchResult function