Earlier this year, Bill Gates unveiled a new water processing machine he was funding that could turn human feces into clean drinking water. The world’s richest man made a blog post about it that, naturally, the internet went nuts over.

Built by the Seattle-based company Janicki Bioenergy, the “Omni Processor” machine is backed by the Bill & Melinda Gates Foundation. And now, after two years in development, the machine is finally getting its first test run in Dakar, Senegal.

Why would you want to turn feces into drinking water? It’s not a big concern in the developed world, but for more than 750 million people around the globe, safe water is not easy to come by. Nearly 1 out of every 3 humans use toilets that aren’t well-connected to sewage systems. And for much of the developing world, clean water can become easily contaminated by and lead to transfer of tons of diseases. More than 840,000 people die each year from water-related disease — more than the population of San Francisco.

In the 3.4 million people in the West African city, almost one half lack access to city’s sewer system, instead storing their waste in pits or septic tanks. Much of the population is too poor to pay for waste removal services, so they’re left to get rid of it themselves. This basically calls for digging a hole near one’s house, manually dumping waste into it, and filling it up when it’s full. It’s dangerous work for themselves and for groundwater spaces that could be contaminated in the process. Such a community would benefit greatly from a system that’s able to treat water and make it drinkable on the cheap.

The Omni Processor also powers itself by converting the waste it processes into electricity. Treated water can be shipped for consumption or for irrigation, and the leftover dried sludge — now also pathogen-free — can be converted into a cheap building material. The plant is also treating one-third of the fecal sludge in Dakar.

The idea behind the Omni Processor, though, isn’t strictly to turn actual human feces into water. It’s designed as an inexpensive method for dramatically improving sanitation in poor cities around the world. “Why hasn’t anyone built one before now?” Gates asked in his blog post. “Because the people who understood the technology weren’t getting sick or dying from contaminated water, and they didn’t know anyone who was. Nor was it clear how they could make a profit by working on the problem. It was a classic market failure.”

“Now we have a business plan, an impassioned team of engineers, great in-country partners, and a pilot project in motion,” he says. “I think we have a real shot at solving the sanitation problem.”