first part of AST working