Updated the code, marquardt function works, outputs values to p0 dataframe