getNextToken implemented