check length of tokens