update cost field