implementing a tokenizer