added getIndex