nncostfunc changed.