new tokenizing (not quite tested)