The toilet is such an easy target for jokes that there is an entire category of humor named for it. Yet the indoor toilet has a long history of boosting public health.

Before an English courtier and godson of Queen Elizabeth I named John Harington invented a flushable toilet in 1596, people had no choice but to do their business in communal outhouses, chamber pots and holes in the ground. These practices led to human waste seeping into groundwater supplies, aiding the spread of disease.

Toilets started to become commonplace in the 19th century, thanks in part to an English plumber with the apt name of Thomas Crapper. Today, 2.4 billion people still don’t have access to clean, safe toilets — a reality that the World Health Organization and others are trying to change.