flat toc rewrite