updates to support low memory resampling of dataset