jackknife - first version.
added NaN break criterion - because otherwise the NR loop will do to many iterations!