Here’s an anecdotal lede that will seem a bit cruel, but might actually be inspiring: There’s an experiment and it involves flatworms. These worms are put under a heat lamp and it’s revved up to a not-quite-lethal temperature. The worms are miserable, but alive and they stay that way for several weeks — at which point new, previously unheated worms are introduced to the environment. The lamp is turned up to what should be a lethal degree. The first batch of worms survives, but the second doesn’t because they’ve never undergone the physiological changes induced by long-term stress.

Humans aren’t flatworms, but both species are organic organisms and, as such, they adapt similarly. The key difference is that — unless we’ve made some weird choices — we’re not under heat lamps; we’re under stress. Our work stresses us out; our families stress us out; our emails stress us out; Facebook stresses us out. And then there’s the big bad: money. More than half of Americans are constantly stressed about cash. If stress could break us, it would have.

But we are actually fairly good at processing stress in a way that makes us more resilient. We figure out how to hit deadlines and make dinner dates. We flatworm the fuck out of our daily routines.

“A stressful event can be a sort of crucible, where people can develop in some very important ways,” Carolyn Aldwin told Inverse. “People don’t only develop by gaining things, but by losing things as well.”

Aldwin is a professor at Oregon State University’s College of Public Health and Human Sciences. One of her specialties is learning how people cope with stress and she has written extensively on the topic. She told me the story about the worms. Aldwin became interested in the subject when, after embarking on a research project in graduate school on adult personality development, she came across an academic paper that said, essentially, if you want to know what a person’s personality is really like, look how they act under stress.

When Aldwin began researching stress, it was a more controversial topic. Back in the 1970s people were arguing over whether stress could affect the body as well as the mind. That debate is now largely over: We know that stress can lead to long and short term psychological and physiological changes. The bad things stress can do to your body are well documented. Chronic stress is linked to cardiovascular problems, your immune cells are weakened, it’s likely that you’ll become sleep deprived. The good things are harder to draw out because they are largely — but not entirely — psychological.

“In the midst of doing all this research we started noticing that some people are like, ‘This is the best thing that ever happened to me,’” says Aldwin. “Some people who had AIDS, or folks who had cancer, or even people who had been through natural disasters would talk about what an important, transformative experience it was for them.”

Aldwin is careful to add that you obviously can’t expect everyone to look at a terrible thing that has happened and immediately say, well, let’s look at the bright side! But it’s interesting to note that research shows that how people deal with trauma and stress lasts much longer than the feelings that may have arose during that trying time.

“You have to understand that people recover and heal in their own time and their own ways,” says Aldwin. “But [stressful situations] can bring people closer together. A lot of people talk about values and value re-clarification. So if you have your health, or say, ‘I realized my family is the most important thing to me.’”

The positive side of stress can be more than a refocus of your priorities — bursts of stress can do a body good. The idea that stress on a psychological level can force you to develop skills that will help you deal with future stress is gaining more and more support. It makes sense — stress evolved from a necessary place of purpose. Our ancestors, faced with danger, experienced a flooding of hormones that elevated their heart rate and prepared them to deal with the problem. Everything comes down to this idea of survival — even a small amount of stress has been found to initiate a redistribution of immune cells, sending protection to wherever the stress zones are.

A recent study from the University of California, Berkeley found that some amounts of stress are the perfect push to get you to your optimal alertness, behavioral, and cognitive performance. When a team of integrative biology researchers caused rats to experience brief, stressful moments the stem cells in the rat’s brains proliferated into new nerve cells. Two weeks later, the rats had improved mental performance.

“You always think about stress as a really bad thing, but it’s not,” said study co-author and associate professor Daniela Kaufer to the Berkeley News blog. “I think intermittent stressful events are probably what keeps the brain more alert, and you perform better when you are alert.”

Of course, whether you’ll experience any of the positive aspects of stress is largely dependent on how you handle stressful situations. One major thing that will help: Making the decision to believe that stress isn’t inherently bad. In a study from the University of Wisconsin-Madison researchers found that people who said they were stressed and who thought high stress would have a negative impact on their health actually did experience poor mental and bodily health. But people who were as equally stressed but didn’t report that they thought it would be bad for them were less likely to have health repercussions. They positive-thought their way into better shape.

You can mitigate the negative effects of stress in other ways. In a study published in 2013, major stress events increased an individual’s risk of death. But this risk of death was completely erased for people who reported high rates of helping other people — even if they dealt with high levels of stress. It’s how the mind perceives stress that acts as a variable for how your body will determine what it will do with that stress.

Aldwin also says that stereotyping situations — thinking things like “you can’t trust anybody” or “all guys are the worst” is also more likely to increase how stressed you feel about the situation.

“The reason I like this field and studying coping is because coping is not innate, coping is something we learn from our parents, our peers, our siblings; the media,” says Aldwin. “It’s things you can change. I think over the course of a lifetime, people do learn which coping strategies work best for them and how to become more efficient, more effective copers.”