added Gauss-Newton for nonlinear optimization