Working on fixing XOR