working bulk iteration but only P xor Q