Katherine Johnson performed what might have been the most important job of her life backwards—because backwards was exactly the right way to do it. The job was figuring out how to ensure that John Glenn, the first American to orbit the Earth, would splash down in the Atlantic as close as possible to the recovery team that would be awaiting him. So Johnson—the legendary NASA “computer,” or mathematician, who was made famous by the book and movie Hidden Figures and who died at 101 on Monday—simply reverse-engineered the entire mission, from desired landing point, back through three orbits and onto the launch pad.

“Early on, when they said they wanted the capsule to come down at a certain place, they were trying to compute when it should start,” she told NASA in a 2008 interview. “I said, ‘Let me do it. You tell me when you want it and where you want it to land, and I’ll do it backwards and tell you when to take off.’ That was my forte.”

Johnson, of course, was only one of a host of great mathematical minds who made NASA’s early history such a success, but it was both her race and gender—she was an African-American woman, working in a white, male field—that helped make her tale both compelling and best-selling. She started at NASA five years before it even became NASA in 1958, having taken a job with the precursor National Advisory Committee for Aeronautics (NACA) back in 1953. John Glenn, Neil Armstrong, Al Shepard, Gus Grissom? All newbies and novices when they finally joined, compared to the likes of Johnson.

President Obama recognized her work in 2015—the year before Hidden Figures became a phenomenon—by awarding her the Medal of Freedom. The medal, the movie and the book ensured that an African-American pioneer who might have lived and died in obscurity finally received the notice she had earned. But not all such often hidden figures have enjoyed such good fortune. From the very beginning, America’s most soaring enterprises—its achievements in space—have not escaped the stain of its primal crime: slavery, and the legacy of racism and institutional injustice that began here in the 17th century and continues into the 21st.

In the same week Johnson died, TIME will release its virtual-reality recreation of the 1963 March on Washington, and the Smithsonian Channel is airing Black in Space: Breaking the Color Barrier, a documentary exploring the halting progress the nation that denied African-Americans their freedom has made in extending that freedom into the realm of space.

The idea of integrating the space program began with good intentions and a surprisingly proactive President. In 1962, President John F. Kennedy ordered the Pentagon to choose an African American to join the third class of astronauts, following the so-called New Nine class, selected in October of that year, and the Original Seven, named in 1959. The Air Force complied, recommending Captain Edward Dwight, a 29-year-old pilot with a degree in aeronautical engineering and 2,000 hours of flight experience. He was slight of build, in keeping with the model of the mid-century astronaut, who had to fit comfortably into spacecraft little larger than phone booths. He was fiercely competitive, which fit the model even more so, and he was a gifted flier.

But none of that meant he was actually going to space.

Dwight thrived in his astronaut training and flight qualification classes, easily making the cut to be included in the group of 26 finalists sent to NASA in 1963, for the next astronaut class. But then, with little explanation, he effectively disappeared from contention.

“I did not dream that I was going to be the first black astronaut,” Dwight, now 86, told Smithsonian. “That never entered my mind because there was a big obstacle standing in my way. I knew there was going to be a racial component to that obstacle but I didn’t know it was going to be as sophisticated and determined as it was.”

As he himself predicted, Dwight did not go to space—and even at the time, his conspicuous absence was noted. At a press conference after the third class of all-white astronauts was named, a reporter put the question of Dwight’s candidacy directly to Deke Slayton, the head of the astronaut office. In footage from the Smithsonian Channel’s documentary, the exchange goes as follows:

“Was there a Negro boy in the last 30 or so that you brought here for consideration?” the reporter asked.

“No, there was not,” Slayton answered, erroneously.

It would take another 20 years before an African American would fly in space, when Air Force Colonel Guion Bluford and the rest of the crew of the shuttle Challenger took off from Cape Canaveral on Aug. 30, 1983. Bluford’s fight came five years after the Soviet Union launched Cuban cosmonaut Arnoldo Tomayo Méndez, the first space traveler of African descent, aboard the Soyuz 38 spacecraft.

It would not be until 1989 that Frederick Gregory would become the first African American to command a NASA mission. And it would not be until 1992 that Dr. Mae Jemison would become the first African-American woman to fly in space. And only in the last few years that Johnson got the recognition she long deserved.

Smithsonian’s Black in Space documentary, TIME’s March on Washington Project and, most poignantly, the death of Katherine Johnson, are vital reminders—and, as in space flight itself, useful course corrections—as America continues its four-century fight for equality. The NASA of now is very different from the NASA of the past, and today’s space agency is a diverse group of multi-cultural men and women better reflecting the equally diverse nation they represent. The agency’s new Artemis program may or may not succeed in its goal of returning astronauts to the lunar surface by 2024, but whenever it happens, the first crew and the ones that follow will look very different from the ones who went before them—the 24 white men who still represent the only human beings who have ever visited another world.

Sign up for Inside TIME. Be the first to see the new cover of TIME and get our most compelling stories delivered straight to your inbox. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Jeffrey Kluger at jeffrey.kluger@time.com.