Refactor recommendationService callback