multi-branch tree builder