When I was 11, I enthusiastically threw a set of juggling balls in the air. Seconds later they came crashing down on my head. At this point, it may have seemed unlikely I would juggle ever again. But I kept practicing, and after two years I was juggling knives and flaming torches. I even convinced some of my friends to learn, and we started performing at birthday parties and other events.

I had acquired a party trick and learned a valuable lesson about giving new, yet difficult, interests a chance. Years later, the same lesson would help me push through grueling statistics classes so that I could pursue my dream major to become a neuroscientist. Finding ways to maintain motivation can be harder than it looks. People can fall into the trap of believing interest in a topic is accompanied by endless motivation. Interest alone doesn’t lead to boundless enthusiasm, but the good news is that there are research-backed ways to motivate yourself to persevere through difficult times.

Scientists at Stanford and Yale are beginning to understand the importance of our beliefs about our interests. People who believe that we are inherently interested in some things and not others, are more likely to give up on new interests in the face of challenge. On the other hand, seeing interests as something that can be developed, leads people to anticipate challenges and maintain their motivation even when the going gets tough. Similarly, mindsets about intelligence and willpower can affect people’s performance and perseverance in the face of challenges as well.

In the Stanford-Yale study, researchers discovered how beliefs about interests affect motivation of college students learning a new topic. Initially, they asked students how much they agreed with statements like “you can be exposed to new things, but your core interests won’t really change” and then gave people a score representing how much they believed that interests were innate. Then students watched a video on black holes and rated their interest in black holes.

Finally, they read a technical article about black holes, then rated their interest again. People who believed interests develop over time remained interested in black holes even if they found the article to be difficult, whereas people who thought of interests as more innate reported that their enthusiasm for the topic waned after struggling through the article.

In other words, the way we think about our interests matters. If we train ourselves to think of true interests as something we appreciate more through hard work, then we’ll be more likely to continue to pursue our dreams. Imagine on the one hand, a child prodigy who was born to play piano versus the person who puts in hours of practice amid disappointments and rejection, to eventually perform at Carnegie Hall. The latter scenario is not only more realistic, thinking of interests in this way can be more motivating as well. Fortunately, researchers at Stanford and elsewhere have developed interventions to help people cultivate mindsets that help us maintain a motivation for learning.

My own dreams of becoming a neuroscientist began to wane when I first encountered statistics. I remember sitting in dark college computer labs, toiling away on specialized software and having no clue why my homework answers weren’t coming out as expected (and maybe once or twice imagining what it would be like to switch to a different degree that didn’t require as much statistics). I began to question “am I good at this?” and “can I make it as a scientist?”

Lessons from my juggling days, however, taught me to keep going. Like those students who continued to have an interest in black holes despite struggling through the technical article, I maintained my interest in the field by accepting setbacks along the way. I resolved to see statistics as an important tool instead of an end unto itself. I trusted that I would at least come to appreciate, maybe even enjoy, statistics for its usefulness in helping me understand the world. I also started study groups with friends to make statistics homework more enjoyable. Eventually I joined a research lab for some hands-on experience. Once I needed statistics to answer questions that really interested me, I was able to better motivate myself to learn them.

Using these approaches, I maintained my motivation to study statistics throughout college and graduate school. I never became a statistics wiz, but I learned enough to be able to use it in my career. And I’m excited to see what interests I will develop next.

Despite my success, I recognize that some people experience additional hurdles to sustaining motivation. Historically underserved groups face negative stereotypes about their ability to succeed in science, in addition to outright discrimination and harassment. Inaccurate messages about interests and motivation may further hinder individuals from these groups from pursuing careers in science when they encounter difficulties, causing everyone to lose out on new insights and discoveries. We need to make structural changes within our institutions to decrease biases in hiring and mentoring while simultaneously harnessing our understanding of motivation to allow all students, and especially underserved individuals, to thrive.

Addressing biases includes a recognition that not all individuals from a particular group will act in a similar way, and that everyone can grow and change. On a personal level, changing narratives about interests may help individuals to grow in the face of setbacks. Our mindsets matter and have very real effects on how we feel and respond to new situations. So next time you’ve got a headache from hitting yourself in the head with juggling balls, or from running frustrating statistics—remember that the headache might someday turn into a passionate career, or at least a fun party trick.