update recommendation function