Swim against the Olympians Michael Phelps or Ryan Lochte and, chances are, you’re bathing in their urine. And they’re not alone. Nearly one in five American adults (pdf, p.5) admits to having urinated in public swimming pools. Phelps, for one, doesn’t think a little in-pool relief is such a big deal.

“I think everybody pees in the pool,” Phelps told The Telegraph in 2012. “It’s kind of a normal thing to do for swimmers. When we’re in the water for two hours, we don’t really get out to pee. Chlorine kills it so it’s not bad.”

But though chlorine might kill bacteria, it also reacts with chemicals in human urine to create harmful gases. Scientists have long-known that when urea—a compound present in urine—combines with chlorine, it gives off nitrogen trichloramine (NCl3), a poisonous gas that can cause acute lung injury. Scientists monitoring the presence of nitrogen trichloramine during a national swimming competition found that it doubled after the first day, increasing by three to four times throughout the rest of the four-day event.

Until now, much less has been known about chlorine’s reaction with uric acid, another chemical in urine. However, recent research indicates that uric acid is responsible not only for more nitrogen trichloramine, but also for a large share—between 24% and 68%—of another dangerous gas, cyanogen chloride, that wafts around indoor swimming pools. If inhaled, the latter compound can harm the lungs, heart and central nervous system, says Jing Li, professor of applied chemistry at China Agriculture University and co-author of the new study. Both nitrogen trichloramine and cyanogen chloride have been linked to acute and chronic health problems among swimmers (pdf), as well as among lifeguards and pool staff.

What does this mean in practice? Imagine a smallish indoor pool during peak hours (pdf, p.4), with 20 swimmers using it simultaneously. Scientists estimate that each swimmer releases 50 mL (0.25 cups) of urine, which in this scenario would equal two pint glasses of pee in total. If the chlorine levels were consistent with those typical of pools in western Europe, that would cause cyanogen chloride concentrations of 12 µg/L (.012 mg/L)—a good bit higher than the the 5 µg/L that the US National Institutes of Health cites as the lowest irritant concentration.

What’s to be done? Li identifies two ways to decrease the concentration of cyanogen chloride. Upping the pool’s chlorine content reduces the cyanogen chloride problem (though it may exacerbate the nitrogen trichloramine problem). Better yet, he suggests: “swimmers can improve pool conditions by simply not urinating in pool.”

While you wait for that happen, the study suggests avoiding “the vicinity of urine release locations in pools.” That means it’s probably wise to steer clear of anywhere with lots of children—or, for that matter, any competitive swimmers.