Added mpfit code