added nested branching to the demo