A new non-linear least squares algorithm for the seismic inversion problem