Hidden Figures, the new film about black female NASA mathematicians that’s pulling in bonkers numbers at the box office, is the perfect escape from the existential dread of inauguration week.

It’s a redemptive telling of American achievement that gives talented individuals who’ve been erased from history the heroic treatment they deserve. It places black women at the center of their own narratives, doing the work to advance themselves and their fellow mistreated employees. Hidden Figures is pro-science, pro–smart people, pro-woman, anti-racism, and anti-Russia. It’s an eminently feel-good (if highly sensationalized) corrective to much of the doom that’s descended over contemporary politics.

The film is also an unmistakable statement in support of bathroom access. Taraji P. Henson plays the brilliant real-life physicist Katherine Johnson, who calculated the trajectories for John Glenn’s orbit of the earth. In the movie, Katherine is forced to walk half a mile from her desk across the NASA campus to use the “colored” women’s restroom. Most of the black women at NASA at the time were relegated to a room for human “computers,” the women who did much of the agency’s calculations by hand. When Katherine is assigned to work in a different building with an elite task force of mostly white male physicists, she finds that there’s no place for her to pee. So she runs back and forth with her stack of binders and papers, in rain and sun, every time she needs a bathroom break.

Katherine’s frequent trips are played for laughs, with Henson hustling through parking lots to producer Pharrell Williams’ “Runnin’.” But the mounting toll it takes on her body and mind is an incisive illustration of the indignities large and small imposed on black women under segregation. Until Katherine complains to her boss (Kevin Costner, playing something of a white savior) and he desegregates the bathrooms so she can work more efficiently, she is put through a grueling ordeal of bladder-holding, running in heels, and showing up at her desk soaked in rain or sweat, all in the daily course of the job she’s been assigned.

This was common practice for black women who worked outside the home in those days. But even after the demise of Jim Crow laws, bathroom access remained a pressing workplace issue for women. In Good Girls Revolt, Amazon’s now-canceled fictionalization of the 1970 Newsweek sex discrimination lawsuit, then-pregnant ACLU lawyer Eleanor Holmes Norton (Joy Bryant) recounts having to walk up and down several flights of stairs each time she wanted to use the women’s restroom. Bathrooms weren’t segregated by race in 1970s New York, but male-dominated law offices didn’t often prioritize the needs of their female employees. Women expended precious time and energy during their workdays going to and from the few available bathrooms. Some likely endangered their health by limiting their liquid intake or holding it.

I feel comfortable making that assumption because several surveys have shown that transgender people—today’s victims of restricted bathroom access—often would rather wait to use a gender-neutral or private bathroom than risk assault, harassment, or arrest by using a restroom that corresponds to their gender. In a 2015 survey of more than 27,000 transgender adults, 31 percent reported eating and drinking less so they wouldn’t have to use the restroom outside of their homes. Eight percent said they’d sustained urinary tract infections or kidney-related problems as a result.

Bathroom access has always been a political issue; restricting bathroom access has always been a means of inflicting physical and mental distress on members of marginalized groups. In Hidden Figures, a more convenient bathroom location supports Katherine’s hard work to get an American in orbit after the Soviets’ success. When schools and state governments keep trans people from using public restrooms—or when anti-trans agitators incite hate that makes restrooms sites of violence—they cause more than an inconvenience. They present a public health threat and prevent people from reaching their full potential at school or work. Whether or not they’re tragically underappreciated math geniuses, every person deserves an accessible place to pee.