basic implementation of the syntax tree