We can divide our solar system up into two halves: the inner portion that contains the four rocky planets (Mercury, Venus, Earth, and Mars), and the outer region that houses the four puffy, gas giants (Jupiter, Saturn, Uranus, and Neptune). Exactly how and why they’ve ended up where they are has been a mystery, until now.

A new study published in Nature investigating the orbital architecture of the star system Kepler-223 and its four exoplanets has helped shed some light into what the four gas giants might have turned into had they not broken off and migrated toward the outer rims of the sun’s orbit.

Heres the deal: scientists are spending a lot more time studying planetary formation in the solar system and other star systems universe, thanks to new technology that allows us to peer off into far off neighborhoods and computer modeling that simulates the current orbital behaviors of gas, rocks, and dust in outer space.

The trove of new data highlighted a strange mystery when it came to Kepler-223: its four planets were exhibiting an unusually stable, long-term orbital structure that was rare for other star systems. Although they are much bigger than Earth, they have nevertheless found themselves trapped in an orbit that is surprisingly close to their host star.

“That’s why there’s a big debate about how they form, how they got there, and why don’t we have one,” says University of Chicago astronomer and study lead author Sean Mills. He and his team used data from NASA’s Kepler telescope to characterize the orbits of the four planets to generate a model that accurately depicts the system’s architecture.

The resulting model illustrates how Kepler-223’s all fall into a strange resonance with one-another — meaning they exhibit orbits that exhibit periodic ratios of movements. For instance, two planets that are in a 2:1 resonance means when one has finished a single orbit around a star, the other will have finished its second orbit at practically the same time.

Never before have astronomers observed a star system with four planets all exhibiting resonance. “This is the most extreme example of this phenomenon,” says study coauthor Daniel Fabrycky.

So what does this have to do with the solar system? Kepler-223 is much older than the solar system — its planets are firmly established in their habits. This could have been the same story for the solar system, but for some reason the gas giants seems to have migrated out and broken away from this locked structure.

Planetary scientists think Jupiter, Saturn, Uranus, and Neptune migrated through the solar system extensively as they were forming. This moment probably shook off the resonance patterns that would have taken hold the way it seems to have happened with Kepler-223’s planets. “These resonances are extremely fragile,” Fabrycky says. “If bodies were flying around and hitting each other, then they would have dislodged the planets [in Kepler-223] from the resonance.”

If the solar system had gone the way of Kepler-223, who knows what would have happened. Earth might never have transformed into such a habitable place the way it did, and life may never have evolved. Or, Earth may have turned out the same but planets like Mars and Venus might not have grown into stable worlds. Perhaps Jupiter would have failed as a gas giant and ended up as just a shell of its current form.