added branching features