Added terminal cost for w