abstract base tree class