updated AST construction