Updating q5,q6,q7,q8 to template v3.