removed unused index var