Created getRecommendation() function.