refines calorie implementation