New idea to use a tree instead of a linear structure to make branching easier