Added a branch function to the tree