prepping for residual resampling