I dont understand why the same approach works for the one function and dictionary and it doesn´t for the second one, even though I just "copied" it.

```
allGuests = {"Alice": {"apples": 5, "pretzels": 12}, "Bob": {"ham sandwiches": 3, "apples": 2}, "Carol": {"cups": 3, "apple pies": 1}}
allCalories = {"apples": {"Calories": 100, "fat": 10}, "pretzels": {"Calories": 200, "fat": 20}, "ham sandwiches": {"Calories": 300, "fat": 30}, "cups": {"Calories": 0, "fat": 0}, "apple pies": {"Calories": 500, "fat": 50}}

def totalBrought(guests, item): 
    numBrought = 0              
    for k, v in guests.items(): 

        numBrought = numBrought + v.get(item, 0) 
    return numBrought

def totalCalories(dish, calories):
    cal = 0
    for k, v in dish.items():
        cal = cal + v.get(calories, 0)
    return cal

print(" Number of Things being brought: ")
print(" - Apples " + str(totalBrought(allGuests, "apples")))
print(" Calories of apples " + str(totalCalories(allCalories, "apples")))
print(" - Cups " + str(totalBrought(allGuests, "cups")))    
print(" - Cakes " + str(totalBrought(allGuests, "cakes")))
print(" - Ham Sandwiches " + str(totalBrought(allGuests, "ham sandwiches")))
print(" - Apple Pies " + str(totalBrought(allGuests, "apple pies")))

```

The (wrong) outcome is:

```
Number of Things being brought: 
- Apples 7
Calories of apples 0
- Cups 3
- Cakes 0
- Ham Sandwiches 3
- Apple Pies 1

```

Can anyone explain to me why it doesn´t work? Seems like a simple logical gap by a python beginner....
Thanks in advance!