rework the TOC handling: not complete