resampling works