template code for reccomender systems