removed debugging output
added method isExistingBranch($branch)