create tree class