code optimization of OverBaggingWrapper