updated TOC parsing