added xor function preferredName.