added support for balanced