Title: A modified marquardt subroutine for non-linear least squares