tree maker def surrounded by class