Refactor Q method yet again