finalizing the TOC