first version of lecture 9 and fixed tokenizer