added testBranch method