calcCostTotal implemented.