Mechanistic and kinetic studies of the thiodediazoniation reaction