Rocket explosions, time-sensitive blood draws, and ultrasound tutorials in the dead of night — the science behind the scenes of the NASA’s Twins Study released today was almost more exciting than the results it contained.

The study looked at the differences between identical twin astronauts Scott and Mark Kelly in the 25 months surrounding the year that Scott spent on the International Space Station. (Mark, who is now running for Senate, stayed on Earth the whole time.) The results, published today in the journal Science, report that many of the in-flight changes to Scott’s body snapped back to the way they were before he left the ground. But some — like damage to his DNA, and drops in his mental performance — didn’t. Overall, the study gave NASA a starting point for research into how long-term spaceflight affects the human body. But to get to that starting line, the researchers who worked on the study had to dodge a lot of obstacles that are unique to spaceflight.

One worry is that long-term spaceflight could harm blood vessel health; researchers have spotted thickening of the carotid artery in astronauts on six-month flights, which could be a signal of potential cardiovascular disease. A team led by Stuart Lee, lead scientist at biomedical contractor KBRwyle, set out to measure Scott Kelly’s carotid artery from down on the Earth’s surface. These measurements are conducted with ultrasounds, which Scott learned how to use before he set off for space. But it took some serious coaching to learn what to do while in a low-gravity environment.

Because astronauts on the International Space Station are on Coordinated Universal Time, that meant middle-of-the-night visits to mission control in Texas where there was a two-way private video conference set up, Lee says. The person in charge of guiding Scott, called the sonographer, could see him and the images he was collecting. “So the sonographer can say, ‘I want you to put the probe here,’ and then he can adjust,” Lee says. The challenge was that there was a two-second delay, and tiny movements of the probe can cause massive changes in the view. “So it’s a real skill by our sonographer to talk people through that.”

“An ‘Oh Crap’ moment”

At least the ultrasound work was remote, but for some of the researchers, there’s no substitute for samples. Scientists needed to get Scott’s blood, pee, and poop from the ISS back to the ground. In at least one case, just getting Scott the supplies to take those samples went disastrously wrong when a SpaceX rocket blew up on its way to the International Space Station in 2015, taking collection tubes and supplies with it. “It was a bit of an ‘Oh crap’ moment,” says Christopher Mason, an associate professor at Weill Cornell Medicine, whose blood collection tubes were on that launch.

When that rocket exploded, the team scrambled to make do with the supplies already on the International Space Station. “What if there’s a problem with the next rocket? And then suddenly we’re out of tubes, and we’re in the middle of a study,” Mason says. Fortunately, he says, the next rocket made it up. “Shockingly, it worked out all right.”

Getting those fluids back to Earth was logistically challenging even when rockets didn’t blow up, according to Lindsay Rizzardi, a senior scientist at the HudsonAlpha Institute and an author on the study. That’s because they needed freshly isolated blood samples for some of the analyses. (Freezing the cells killed some of them, and it made the mixture hard to separate into different cell types, she says.) That meant Scott could only collect samples when a spacecraft was scheduled to leave the space station.

“It’s mind-boggling to think that we were looking at samples that were in space 48 hours ago.”

Carefully packed into the spacecraft, the samples hurtled down to Earth, landed in Kazakhstan, and then were loaded onto a plane to Houston. There, a researcher processed the blood before sending portions off to the different labs. “All of that happened in under 48 hours,” Rizzardi says. “It’s mind-boggling to think that we were looking at samples that were in space 48 hours ago.”

Rizzardi calls this a massive pilot study that shows it’s possible to do genomics in space. And while they can’t draw any sweeping conclusions about the effects of a long stay in space on the human body, they have ironed out some of the logistical kinks for future research. When she was still a postdoc at Johns Hopkins Medicine, Rizzardi spent days on the plane known as the “vomit comet” trying not to vomit as she and her colleagues worked out how to prepare the blood samples during periods of weightlessness. That way, in the future, samples may be able to stay on the space station longer instead of needing to be rushed back to Earth.

Before the study started, she says, “We didn’t even know if we’d be able to get our samples back and forth.” Now, they know they can; they just need more willing participants like the Kellys. “I think with more astronauts we’ll be able to flesh this out really well and get some great insights,” she says.