update reame and index