Implemented low variance resampling.