wip refactor of tokenizer