Adapted balance to new lib structure