added damped gauss-newton method