changed XOR to || so that duplicates are not obtained in Passive.c