Adding state diagram for q2