Updates to total calculation