Resampling. Doesn't work yet.