update tom and index