update index method