wrote repeating xor