Making sure that astronauts have enough to drink is one of the toughests parts to figuring out long-term space travel. Water is heavy, quickly used and expensive to get into orbit. To put it into perspective, it costs $10,000 per pound to launch a spaceship, and a gallon of water weighs 8.33 pounds.

Related Content What Happens to the Human Body in Space?

Astronauts are limited to three gallons a day when they're in space, but that still adds up. $249,900 each day! As NASA sets it sights on Mars, astronauts will need an efficient way to recycle water.

Astronauts have been drinking distilled urine since 2009, and they currently recapture 93 percent of wastewater, but the system they’re using now is heavy, slow and has been prone to breaking down. It spins the urine at high speed to separate out the water vapor, then treats it chemically. The system can recycle 6,000 liters a year, but that's not enough to sustain a crew of multiple astronauts over a long period.

So astronauts on the International Space Station are testing a new way to drink filtered pee. Aquaporin A/S, a Danish biotech company, has developed a filter that uses aquaporin proteins to pull clean water out of urine, sweat, wastewater, condensation and other liquid sources available in space. Aquaporin molecules are proteins that live within cell membranes that are super efficient at letting water pass through, but don’t transfer anything else.

“There are many types of aquaporins, some can do the selective water transport better than others, but in essence this is what makes our membrane technology unique. We use these proteins as building blocks in the fabrication of the membranes,” says Claus Hélix Nielsen, Aquaporin’s vice president for public-private partnerships.

The filter works essentially the same way your kidney does. The system is just two tubes hooked up to an energy source. It pulls a liter of urine from one container through the filter and out into another container in less than a minute. The device is small, light and less likely to clog than the filters currently being used.

Aquaporin A/S has been working with NASA since 2011, testing prototypes in a lab. “So far, the Aquaporin Inside Forward Osmosis membrane is the only membrane we have tested that comes very close to fulfilling the membrane requirements for a simple, lightweight and reliable system to extract potable water from body fluids in space,” Michael Flynn, head of the advanced human support technology research group at NASA Ames, said in a press release.

As of last week, European Space Agency astronaut Andreas Mogensen is at the International Space Station testing the filters. Mogensen will be filtering three urine samples while he’s in space. He’s also bringing the filtered water back to Earth to be analyzed here. If the system works well, Aquaporin A/S would like to bring the device to other places where clean water is hard to come by—whether that be developing countries or drought-ridden areas.

“The main importance lies in our ambition to deliver low-energy solutions for water treatment,” Hélix-Nielsen says.