General chemistry has a terrible reputation on most college campuses. It’s seen as a killer—a place where dreams of careers in science, technology, engineering and mathematics (STEM) go to die.

Now the data have spoken, and their message is clear: the bad rep is justified. And the numbers are especially bleak for students who are underrepresented in STEM. Women, underrepresented minority racial and ethnic groups, individuals from low-socioeconomic-status households and students who will be the first person in their family with a four-year degree are all getting pounded in general chemistry. In some cases, they experience achievement gaps of more than half a grade point.

But gloom doesn’t have to equate to doom. The data my research group analyzed also say that if underrepresented students pass general chemistry with even an “okay” grade—in most cases, a C+ at minimum—they persist in the general chemistry sequence, and thus stay in STEM training tracks, at much higher rates than overrepresented individuals who get the same grades. When compared with their peers, the underrepresented “hyperpersist.” They show grit. And changes to how we teach can lift more underrepresented students into that hyperpersistent zone.

Recent work by my group used data from 41 studies and almost 54,000 students to show that across the STEM disciplines—and while controlling for exam difficulty—college courses that used “active learning” reduced the achievement gaps observed in lecture-oriented courses.

Wider adoption of research-based teaching holds the potential for a virtuous cycle: Performance gaps will close, more underrepresented students will get grades that inspire them to hyperpersist, and more underrepresented students will complete STEM degrees. Clinics, research labs and engineering firms will benefit from the problem-solving ability, resilience and cultural proficiency of a diverse workforce. A stubborn barrier to economic mobility will begin to crumble.

To get from here to there, we first need to recognize two key obstacles that hold underrepresented students back. One affects the heart; the other affects the head.

The fact of underrepresentation can lead to alienation: “I don’t belong here.” Even capable students are unlikely to thrive after receiving that message. For women and underrepresented minority racial and ethnic groups, the problem is compounded by stereotype threat. First described by psychologists Claude Steele and and Joshua Aronson in 1995, stereotype threat is the cognitive burden of dealing with a stigma that is attached to your gender, race or ethnicity. Women in linear algebra courses, for example, spend a lot of time and energy dealing with male classmates who think that their female peers can’t do math. That time and energy can’t be used to solve linear algebra problems, which leads to underperformance.

Consistent with this view, our analysis of general and organic chemistry grades found evidence of underperformance. When we controlled for college entrance examination scores and high school grade point averages—allowing us to compare outcomes for students with identical indices of academic preparation and ability—we found that underrepresented individuals were still experiencing significant gaps in their final grades. This result means that something about these courses caused underrepresented students to perform at less than their capability—a pattern that’s been observed for women across STEM courses.

Fortunately, research has revealed a range of effective countermeasures. Interventions based on short writing assignments that affirm self-worth in the face of stereotype threat have helped reduce achievement gaps in STEM classrooms. And short but highly structured exercises that promote a sense of belonging can improve outcomes for underrepresented minority groups in  college. Inclusive teaching can do so as well. The technique starts with grading systems that are mastery-based and noncompetitive and continues with micro affirmations from the instructor that reinforce a key idea: all students can rise to the demands of this rigorous course and succeed.

And what about achievement gaps that appear to be caused by poor preparation arising from educational and economic disadvantage, which represented the larger portion of those we documented? If college instructors don’t do anything about them, it means that birth is destiny when it comes to STEM careers. This is where active learning comes in.

Active learning classrooms are noisy, energetic places where students work together to wrestle with challenging problems. Instead of serving strictly as a source of information and authority, the instructor acts like a good athletic coach or music teacher, setting goals in a sequence that pushes students to progress and providing timely feedback. Students in active learning classrooms team up to collaborate with their peers, just as STEM careers demand. Our results have shown that people from low-income backgrounds get an extra benefit from this intense exposure to deliberate practice, which their prior education has lacked.

So we know there’s a way to narrow achievement gaps. But is there a will? Creating learning environments where underrepresented students can thrive—and where equity and inclusion are realities and not platitudes—will have to happen instructor by instructor, course by course and program by program. The time to start is now.