refactor Tokenizer