added branching functionality
Merge pull request #19 from patrickdmccarthy/branch

added branching functionality