faster jacknife resampling function due to limited allocation