send result of totalCalories to console