[BenweiZhu] modify condition pq pp qq
[BenweiZhu] add condition pq pr qq test