tree generation+ breadth first