basic recsys code