initial support for balanced -- implementation and generic fixes