abstracted grand_branches and not_grand_branches to tree.jl