Define index method