The situation in Flint, Michigan, is grim. Faced with the reality that lead-contaminated the water that washed and quenched thousands of Flint residents, President Barack Obama on Saturday declared a state of emergency. This was long after state officials quietly removed a fairly heinous “safe to wash” poster that features babies bathing in supposedly “safe water.” The state defended the water quality until January 11 and less than a week later, the National Guard and Federal Emergency Management Agency have moved in, delivering aid and bottled water.

Soldiers from the Michigan Army National Guard Flint prepare to give Flint residents bottled water at a fire station January 17, 2016 in Flint, Michigan.

How did the water get so bad? Testing of the Flint water in nearly 300 homes found lead levels of 27 parts per billion, almost double that of Environmental Protection Agency recommendations. Some experts have argued that the problem should have been obvious a long time ago. It’s easy for hindsight to trigger blame (or righteous anger!), but just because there’s a state of emergency now doesn’t mean people haven’t been talking about the shoddy water quality for months.

The problem goes back to money, as it does with all municipal banalities that lead to disaster, and chemistry. Flint used to get water from Detroit; in 2014, Detroit’s prices had risen to the point that Flint decided to make its own system using the water of Lake Huron. In the meantime, as the infrastructure was being built, Flint would siphon water from the Flint River.

Though it worked fine with treated Detroit water, Flint’s hoary network of iron pipes and lead plumbing wasn’t prepared for the high chloride concentration of Flint River water. Chloride leads to corrosion, which is why, more than a year ago, in January 2015, reports of nasty water surfaced. Virginia Tech civil and environmental engineer Marc Edwards — something of a water quality maven — traveled to Flint last fall and found that the pipes were corroding at 19 times the rate when the system had pumped Detroit water. “Any competent person should have seen this water will eat up iron and eat up lead,” he told the Detroit Free Press at the time.

If you’ll recall high school chemistry, the science of rusting oxidation reactions is fairly simple. Charged negative ions (in this case, the chloride) enable electrons to more easily shuttle off metal and form oxides; in Flint’s case, both these metals are the iron and lead in the plumbing. That old systems contain lead isn’t surprising — nor is the fact that Flint River is high in chloride. Officials tested the Flint River for drinking potential in 2011.

The study’s recommendation? It was adding an anti-corrosive agent, as CNN notes, at the cost of $100 a day.