Slicing into an onion will bring tears to your eyes. But no one understood why this vegetable could make you cry until recently.

Researchers at Case Western University in Ohio discovered that onions contain a protein—a large biological molecule—called alliinase, as well as a chemical called sulfenic acid. These two substances are usually kept apart within an onion’s cells. But when you chop an onion, the two substances mix, causing a chemical reaction. It creates a new molecule called lachrymatory factor.

“This new molecule evaporates into a gas and floats up, eventually reaching our eyes,” says Josie Silvaroli, the lead author of the study. The molecule irritates our eyes, which react by making tears to flush it out.