added toc function