The world treats outer space much in the same in way in treats international waters: No country or entity can make a claim of sovereignty over that land (or in this case, space). But that doesn’t mean anything goes. The same way the international community has agreed-upon rules for what is and isn’t allowed in international waters and how to prosecute people who commit criminal acts in those places, the same kind of framework largely applies to the legal space of, well, space.

In a cute new video posted to YouTube, Wendover Productions goes over a quick summary about how exactly space laws came into existence, and what exactly they allow and forbid among the few countries of the world engaged in active space exploration.

The whole video is worth a watch, but the most interesting nuggets are when the narrator predicts what might happen if an astronaut commits a crime in space? Aboard a rocket orbiting the Earth, the same rules that govern international waters apply to spacecraft — it would be up to the country that owns that vessel to decide whether they want to prosecute the perpetrator, and how they would go about that.

But you don’t necessarily need to be in a spacecraft to commit a crime. If you stab someone on the moon, what then? Nobody owns the moon; the 1967 U.N. Outer Space Treaty specifically forbids any country or group from having the right to claim sovereignty over pretty much any celestial object — be it moon, planet, asteroid, even a lousy comet.

As the video explains, we would most likely follow the rules established by “extraterritorial jurisdiction,” where someone is bound by the laws of the country from which they originate if they are not presently in another country. If stabbing people is against the law in your own country, you’ve committed a crime, and that country has a right to prosecute. A friend of yours also on the moon might be free to stab whomever without repression if his/her country has no law against stabbing.

As many of you are probably thinking, there’s one place in space that seems to flout both of the standards we’ve just outlined — the International Space Station:

The International Space Station

Under the current agreement signed by all the countries that have worked on the ISS, each astronaut is covered by extraterritorial jurisdiction — they are subject to the laws of their own country. But they also cannot infringe on the rights of other astronauts onboard. So you can’t just float around kicking people in the groin or swatting iPhones out of others’ hands, because another country has the right to prosecute you.

In addition, all partner states must adhere to extradition requests related to crimes aboard the ISS — even if those two states don’t maintain an actual extradition treaty. For instance, Russia has never been legally obligated to send Edward Snowden back to his home country. But if he had leaked the NSA documents while he was on the ISS, Russia would have been required to ship him off to the United States on the first ride back to Earth.

The rest of the video kind of goes off on the deep end and starts debating the legal ramification of babies being born in space. In a normal instance (and remember, we’re not even sure if its biologically feasible to birth a kid in zero-gravity), the baby would probably just take the citizenship of their parents — the same way a baby born to American parents on vacation China would still be born with U.S. citizenship.

Some countries, however, don’t have those kinds of exceptions for people born outside their own borders. In those instances, like when there’s a baby born onboard a plane, the baby would probably take the nationality of the country with which the spacecraft is registered.

How about a baby born on the moon? Or on Mars? Or on the ISS? Or to aliens?

Obviously, we don’t have answers to that stuff. And that’s expected — space travel is still such a new part of our lives, and most countries are more concerned with problems here on the ground. But the time for us to establish a legal framework for space is coming up sooner than we think. With private companies making big strides in their own launch technology and countries like the United States (and Luxembourg?) laying the groundwork for commercial space mining, the space laws will play a pivotal role for our future.