Extracted getBranchName method - needed at 2nd location