wrote the tokenizing part of the tokenizer