updated jackknife code