more encapsulation of AST