define the function of AST