Q should be based on X and R based on Z.