improvement to depth class with nested TOCs