added xor on the key