done for xor