don't use lmdif1 function for LM