As you prepare your traditional Thanksgiving feast, you may want to swap out those pilgrim salt-and-pepper shakers with a mastodon and a caveman instead. We owe a lot to this ancient duo. Without them your mom couldn’t bake your favorite pumpkin pie. Gone would be your sister-in-law Celia’s delicious squash casserole. And your Pinterest-ready cornucopia would be dreary.

Believe it or not, it’s not your grandmother nor is it Martha Stewart who had the most influence on this part of your traditional celebration. It’s your great, great, great-to- the-ten-thousandth grandmother who we should thank for saving the squashes of today from going the way of the mastodon and giant sloth. That’s according to a new study running in the Proceedings of the National Academy of Sciences.

The authors came to this conclusion after studying something decidedly unappetizing: seeds preserved in ancient animal dung. Yes, what we know about these Thanksgiving favorites came from a probe of petrified poo. Please, impress your Auntie Mary with this Turkey Day tidbit only after she’s finished with the pie course.

Study authors ran genetic tests on ancient seeds for 91 plants of the Cucurbita genus — the fancy Latin name for your squashes, pumpkins and gourds. The really wild version of these baseball-sized plants were a bit like your great Uncle Bill after a few holiday martinis.

“They were small, tough and bitter,” author Logan Kistler said.

Lindsay Wyatt, a plant breeder who did not work on the study, but who grew some of these ancient gourds a few years ago, said they were definitely not fit for your holiday menu (unless you didn’t really like your guests?).

“I had to smash them open with a cinder block to get the seeds out, you could crush them pretty easily but they were not knife friendly,” Wyatt said. “They were also so bitter that even after I washed my hands after handling them, when I’d eat my lunch later in the day it made the lunch taste funny.”

Bitter and hard was not a problem for the megafauna of the era, according to the study. The mastodons and giant sloths were strong enough to get through the tough skin. The authors say the large animals had fewer copies of the bitter tasting gene, meaning to them it wasn’t toxic as it was for smaller animals. These large animals actually encouraged wild gourds to grow, grazing so much there was room for these plants. Unable to digest the seeds, the animals would spread the seeds around as they traveled and essentially pooped in different places.

As these animals started to disappear, these wild gourds did, too. What saved the gourd then from extinction were ancient farmers. Our ancestors didn’t mind the tough skin, as gourds could be used to carry liquid in those pre-pottery days. Fisherman also used them to keep their nets afloat. But they had to do something about the taste. So farmers must have cultivated the gourds that weren’t as bitter.

The growing tradition carries on today. “What we grow changes with personal taste and fads and viability, this is not a static discipline; this is a constant evolutionary process with plants,” Kistler said.

Wyatt, who works for Johnny’s Selected Seeds in Winslow, Maine, said even in the last few years market appetite has shaped the variety of gourds.

“I think this is in part because of the Pinterest side of things,” Wyatt said, meaning people want to take pictures of a wider variety of seasonal gourds. “But also with the growing interest in locally grown fruit and vegetables, there is a much wider appreciation of culinary quality these days.”

Her company does what our ancestors did, although the gourds our ancestors grew would likely taste different from the ones Americans like today. Growing fruits and vegetables “is a continual process of improvement,” she said. And tastes vary. Americans like sweeter gourds. Some Asian cultures prefer more neutral tasting gourds with a heavier starch quality that holds up well in cooking.

Daniel Sandweiss, a professor of anthropology and climate studies at the University of Maine, said he appreciated this PNAS study as a reminder of the impact even a tiny population like these ancient ancestors could have on what’s on our table thousands of years later.

“Humans have such a large and sometimes unexpected influence on economies and ecosystems,” Sandweiss said. “The squash we have today are remaining representatives of this genus of plant which otherwise would have been in trouble for survival because of the changing landscape.”

“It’s fascinating to think what impact human intervention can have even through the depth of time,” Sandweiss said.

Climate change, a new technology, your decision to try a different pumpkin pie recipe — all of these factors could change food tradition for thousands of years to come. If that’s too much pressure to think about this holiday, maybe you should consider another current Thanksgiving tradition that has evolved over thousands of years of heavy meals — a nice, long after-dinner nap.