refactored the totals display for logged foods