got K and E XOR K working