creates a tree