add bagging procedure