adding branches to the tree