everything except for resampling