added support for balanced bagging
added support for balanced bagging