changed greedy edge join to any node in the tree, instead of just the terminals