Minor improvement
New simple resampling algorithm