Added preliminary xor algorithm