[BenweiZhu] add condition pq pq pq, pq pq qq, pq pq qr