handle different index methods