Rewrote XORInternal