added branching for dance3