add printing to AST