implemented algorithm to draw all tree according to a tree model