+ getIndex function