DETROIT (WXYZ) — Detroit and the surrounding communities are losing around 30 million gallons of water a day, and believe it or not, that’s a major improvement over years past.

In 2012, Detroit water losses spiked to 50-80 million gallons a day. The losses come from unidentified leaks, broken water mains and theft — and it adds up. It matters because it costs roughly $400 to produce a million gallons of drinking water and $800 for every million gallons that has to go through the water treatment process.

“The silent but deadly, so to speak, are the leaks that are underground that you don’t see that never surface,” said Palencia Mobley, the deputy director and chief engineer at the Detroit Water and Sewerage Department. “There’s also the houses people move out of and leave the water running, and you don’t find out until the neighbor calls because it happens to make it out of the basement.”

The city is preparing to spend nearly a half billion dollars on improve the water mains and sewer lines in the city — that’s a big upfront cost that Mobley believes will help stop costs down the line. She noted the way they work is changing too. They’re now more targeted in neighborhoods to fix entire systems instead of patching throughout the city. There is also work going into modernizing mapping systems throughout the city so they can improve response and speed of fixes.

“We’re working on a couple of initiatives right now and one of the things we’ve really ramped up is our water main replacement,” said Mobley.

Other reasons for a drop in wasted water include the city’s revenue protection unit that’s identified $8.6 million worth of payments that were outstanding, and the city’s demolition program which took a number of homes that were responsible for leaking water off the map.