A dye chemist prepares a diazonium solution for a coupling step. Aniline in ice-cold dilute hydrochloric acid is treated with sodium nitrite solution added slowly, and the mixture is kept below 278 K throughout. A student uses 3 mol of acid for each mole of aniline, although the balanced equation needs only 2 mol. What is the main purpose of the extra acid?