add the code for recommendation algorithm