adding tree class