update and index