typo in token- should be tokenIndex