add index prototype