changed AST code