updated toc parsing