working on parse tree construction