refactor Q2