edit index method