adding calculations for q1