Implemented getIndex()