update words and TOC