can dynamic calculate TotalCost