working two types of trees