totalCost added, but needs definition