speed up with an OO representation of the AST (instead of record-style)