new version, refractored and with updated tokenizer/parser for grade a/b