some code for recommender