tree class