update text and index.