close to working xor