Improve the Recommender class to perform the failure function.