fix
xor functions done