Implemented getIndex