(This post has been updated.)

To understand how we process gratitude, researchers tapped into the memories of Holocaust survivors.

Nearly two dozen millennials with no connection to the Holocaust were first immersed in the genocide’s history. Then the study participants heard stories taken directly from survivors accounts of when, in the midst of such abject horror, people came to their aid.

Neuroscientists at the University of Southern California were able to map the mostly 20-somethings’ feelings of gratitude in the brain as they listened to the stories.

Using Holocaust survivor testimonies archived at the USC Shoah Foundation, the young study subjects heard vignettes of “a stranger offering a bit of food or a neighbor providing a place to hide,” said USC Shoah Foundation Executive Director Stephen Smith.

“These small acts of generosity helped them hold on to their humanity,” Smith said in a press release.

Glenn Fox, the lead researcher on the study, showed the participants documentaries about the rise of Nazism, the concentration camps and the liberation in 1945 while they were laying inside an MRI scanner tube. This was intended to mirror the immersive experience of visiting the Holocaust museum.

Then the individuals were given various scenarios taken from survivor testimony and asked to imagine how they’d feel. You’re on the run from the Nazis, they were told, and a family takes you in at their own risk. In another example, you’re already in a camp and very ill when a fellow prisoner who is a doctor helps nurse you back to health.

They were told to rate the depth of the gratitude they felt, while the MRI tracked the gratitude’s circuitry in the brain, according to a USC press release.

Fox explained in the release that the study determined that feelings of gratitude activates a part of the brain that triggers other positive feelings like reward, fairness and self-awareness. In an interview, Fox said the finding helps confirm the relationship between thankfulness and other positive emotions.

“It gives us something real to hang our hats on for chasing this important emotion of gratitude,” Fox said. “That will really help us home in on the best interventions. What is the best way to feel grateful when you’re having a tough time … this study is a nice foundation for that type of research to take place.”

Of late, there’s been an uptick in scientific research devoted to studying the positive health benefits of gratitude. The Greater Good Science Center at the University of California, Berkeley invested in a multi-year study on what happens when people expand their practice of gratitude.

One of the premiere gratitude researchers, Robert Emmons, who leads that study, has found that being thankful has a profound impact on a person’s physical, mental and social health. He has determined that cultivating gratitude is one of the best ways to sustain feelings of happiness.

Now that Fox can track the route those feelings take through the brain, he plans to continue exploring how they benefit those other aspects of our well being.

“The brain region reinforces it is a social and rewarding emotion,” he said. “It involves understanding ourselves and our relationships to others. It’s not just a synonym of happiness and it’s not just about getting nice things.”

Want more inspiring news and ideas to improve your life? Sign up for the Saturday Inspired Life newsletter.

If you liked this story on Inspired Life, you may also enjoy: