created private method for get search results