fortmp
 fixbug
 at least loss function is descent