modify index method