Refactored ingredientMatch method.