changed ScaledCost to scaled_cost