Sequence control with selective branching