update the index