completed bootstrap resampler