make newcost work like cost