Robots suck at getting around, and humans do too. Flying is fast, but energy expensive; driving is efficient, but slow. So a group of researchers at MIT decided they should just build a robot that does both — which could be the first step toward refining the concept of flying cars.

On Monday, a team of researchers at MIT’s Computer Science and Artificial Intelligence Laboratory showed off a groundbreaking demonstration of a system of tiny drones that can both fly and drive around a model track. Using an algorithm, the little machine can determine when the best choice is to fly — or drive. The research, still in its infancy, could have huge repercussions on flying cars down the road (and the demonstration is pretty adorable as well).

Right now, the eight small quadcopter drones can currently fly 90 meters or drive 252 meters, according to simulations. While the weight of the wheels reduced the length of the battery life, researchers say the benefits of having two travel modes outweighs the cost.

But the real innovation isn’t purely physical. The researchers have also developed a system that helps the drones decide when it’s best to drive and when it’s best to fly. This is based on battery life and the circumstances ahead of the drone’s path. The researchers have trained the drones to fly over obstacles that would block them from moving on the ground, and then land and drive to get close to their destinations.

See also: Dubai Wants to Have Flying Taxis in the Sky by July

These drone simulations build off previous research on robotic collaboration. In 2016, other MIT researchers debuted a decentralized communication system for teams of robot drones. This initial research showed that the communication between robots could be significantly reduced without causing more collisions.

Though the technology is currently confined to small drones, in the future it could be applied to flying cars, to allow passengers to move from place to place in the most efficient way. Flying cars are on the tip of everyone’s tongues, but the early innovations have faced numerous challenges, including issues of design, legality, and cost. Companies like Uber are already investing in a system of short-hop aircraft that could fly over obstacles in the same way as the drones, but the missing step is designing a vehicle that works as well as a ground vehicle as it does in the air, or vice versa (Uber’s plan involves a vehicle switch from a traditional car to a small aircraft). Still, the MIT demonstration shows that a true dual-use vehicle could be programmed for maximum efficiency.

Photos via MIT CSAIL