Refactor q3 with q2