smooth function
smooth function
Switched to Marquardt-Levenberg