refactor createBranchEl