Make format_recommendations a static method