update text and toc