add index method