Thanksgiving is a good time to express our sincere gratitude that we no longer “enjoy” the “simpler life of yesteryear.” As my grandmother said, “The only good thing about the good old days is that they’re gone.”

For countless millennia, mankind lived on a precipice, in hunter-gatherer, subsistence farmer and primitive urban industrial societies powered by human and animal muscle, wood, charcoal, animal dung, water wheels and windmills. Despite backbreaking dawn-to-dusk labor, wretched poverty was the norm; starvation was a drought, war or long winter away; rampant diseases and infections were addressed by herbs, primitive medicine and superstition. Life was “eco-friendly,” but life spans averaged 35 to 40 years.

Then, suddenly, a great miracle happened! Beginning around 1800, health, prosperity and life expectancy began to climb … slowly but inexorably at first, then more rapidly and dramatically. Today, the average American lives longer, healthier and better than even royalty did a mere century ago.

How did this happen? What was suddenly present that had been absent before, to cause this incredible transformation?

Humanity already possessed the basic scientific method (1250), printing press (1450), corporation (1600) and early steam engine (1770). So what inventions, discoveries and practices arrived after 1800, to propel us forward over this short time span?

Ideals of liberty and equality took root, says economics historian Deidre McCloskey. Liberated people are more ingenious, free to pursue happiness, and ideas; free to try, fail and try again; free to pursue their self-interests and thereby, intentionally or not, to better mankind – just as Adam Smith described.

Equality (of social dignity and before the law) emboldened otherwise ordinary people to invest, invent and take risks. Once accidents of parentage, titles, inherited wealth or formal education no longer controlled destinies, humanity increasingly benefitted from the innate inspiration, perspiration and perseverance of inventors like American Charles Newbold, who patented the first iron plow in 1807.

Ideas suddenly start having sex, say McCloskey and United Kingdom parliamentarian and science writer Matt Ridley. Free enterprise capitalism and entrepreneurship took off, as did commercial and international banking, risk management and stock markets.

Legal and regulatory systems expanded to express societal expectations, coordinate growth and activities, and punish bad actors. Instead of growing, making and buying locally, we did so internationally – enabling families, communities and countries to specialize, and buy affordable products from afar.

The scientific method began to flourish, unleashing wondrous advances at an increasingly frenzied pace. Not just inventions like steam-powered refrigeration (1834) but, often amid heated debate, discoveries like the germ theory of disease that finally bested the miasma theory around 1870.

All this and more were literally fueled by another absolutely vital, fundamental advance that is too often overlooked or only grudging recognized: abundant, reliable, affordable energy – the vast majority of it fossil fuels. Coal and coal gas, then also oil, then natural gas as well, replaced primitive fuels with densely packed energy that could power engines, trains, farms, factories, laboratories, schools, hospitals, offices, homes, road building and more, 24 hours a day, seven days a week, 365 days a year.

The fuels also ended our unsustainable reliance on whale oil, saving those magnificent creatures from extinction. Eventually, they powered equipment that removes harmful pollutants from our air and water.

Today, coal, oil and natural gas still provide 80% of America’s and the world’s energy for heat, lights, manufacturing, transportation, communication, refrigeration, entertainment and every other aspect of modern life. Equally important, they supported and still support the infrastructure and vibrant societies, economies and institutions that enable the human mind (what economist Julian Simon called our Ultimate Resource) to create seemingly endless new ideas and technologies.

Electricity plays an increasingly prominent and indispensable role in modern life. Indeed, it is impossible to imagine life without this infinitely adaptable energy form. By 1925, half of all U.S. homes had electricity; a half century later, all did – from coal, hydroelectric, natural gas or nuclear plants.

Medical discoveries and practices followed a similar trajectory, as millions of “invisible hands” worked together across buildings, cities, countries and continents – without most of them ever even knowing the others existed. They shared and combined ideas and technologies, generating new products and practices that improved and saved billions of lives.

Medical research discovered why people died from minor wounds, and what really caused malaria (1898), smallpox and cholera. Antibiotics (the most vital advance in centuries), vaccinations and new drugs began to combat disease and infection. X-rays, anesthesia, improved surgical techniques, sanitation and pain killers (beginning with Bayer Aspirin in 1899) permitted life-saving operations. Indoor plumbing, electric stoves (1896) and refrigerators (1913), trash removal, and countless other advances also helped raise average American life expectancy from 46 in 1900 to 76 (men) and 81 (women) in 2017.

Washing visible hands with soap (1850) further reduced infections and disease. Wearing shoes in southern U.S. states (1910) all but eliminated waterborne hookworm, while the growing use of window screens (1887) kept hosts of disease-carrying insects out of homes. Petrochemicals increasingly provided countless pharmaceuticals, plastics and other products that enhance and safeguard lives.

Safe water and wastewater treatment – also made possible by fossil fuels, electricity and the infrastructure they support – supported still healthier societies that created still more prosperity, by eliminating the bacteria, parasites and other waterborne pathogens that made people too sick to work and killed millions, especially children. They all but eradicated cholera, one of history’s greatest killers.

Insecticides and other chemicals control disease-carrying and crop-destroying insects and pathogens. Ammonia-based fertilizers arrived in 1910; tractors and combines became common in the 1920s. Today, modern mechanized agriculture, fertilizers, hybrid and biotech seeds, drip irrigation and other advances combine to produce bumper crops that feed billions, using less land, water and insecticides.

The internal combustion engine (Carl Benz, 1886) gradually replaced horses for farming and transportation, rid cities of equine pollution (feces, urine and corpses), and enabled forage cropland to become forests. Today we can travel states, nations and the world in mere hours, instead of weeks – and ship food, clothing and other products to the globe’s farthest corners. Catalytic converters and other technologies mean today’s cars emit less than 2% of the pollutants that came out of tailpipes in 1970.

Power equipment erects better and stronger houses and other buildings that keep out winter cold and summer heat, better survive hurricanes and earthquakes, and connect occupants with entertainment and information centers from all over the planet. Radios, telephones, televisions and text messages warn of impending dangers, while fire trucks and ambulances rush accident and disaster victims to hospitals.

Today, modern drilling and mining techniques and technologies find, extract and process the incredible variety of fuels, metals and other raw materials required to manufacture and operate factories and equipment, to produce the energy and materials we need to grow or make everything we eat, wear or use.

Modern communication technologies combine cable and wireless connections, computers, cell phones, televisions, radio, internet and other devices to connect people and businesses, operate cars and equipment, and make once time-consuming operations happen in nanoseconds. In the invention and discovery arena, Cosmopolitan magazine might call it best idea-sex ever.

So, this holiday season, give thanks for all these blessings – while praying and doing everything you can to help bring the same blessings to billions of people worldwide who still do not enjoy them.