[BenweiZhu] modify condition_pq_qr method