Added XOR method.