Needles aren’t popular. For people with type 1 diabetes (and some with type 2 diabetes) that can be a problem, since treatment requires regular injections with insulin.

Now, researchers at MIT have come up with a novel way to one day eliminate the need for injections: with a tiny swallowable device that can automatically inject insulin directly into the stomach wall. In a report published in Science, Robert Langer and Giovanni Traverso describe what they call a self-orienting millimeter scale applicator, or SOMA, that they developed to make injecting drugs easier.

So far, SOMA has only been tested in animals. Roughly the size of a capsule and made of stainless steel and other biodegradable materials, SOMA is equipped with a spring-loaded needle that contains insulin. It’s also weighted so that it always rights itself — like a wobble toy — and the opening for the needle can always find its mark (in this case, the stomach wall). When the team tested the device in pigs, the device always righted itself so that when the spring holding the needle was triggered by the water in the stomach, the needle pierced the pigs’ stomachs, delivering an insulin payload. In three pigs that swallowed the SOMA, the device led to similar blood levels of insulin as injections through the skin.

Langer and Traverso say more studies need to be done in more animals, but believe the technology has potential in helping deliver more drugs to more people in coming years. People are still uncomfortable with the idea of injecting themselves with a needle, they say, and studies show that discomfort and fear has led to a seven to eight year delay in starting insulin treatment on average for people with diabetes. “We see tremendous potential in eventually treating many diseases,” says Traverso.

Their device was inspired by nature: specifically the leopard tortoise, which has a uniquely narrowed shell that allows it to right itself after falling on its back. The design makes it possible for the SOMA to inject properly even if the animal moves around after swallowing it. It’s important, however, that the stomach is empty in order for the device to inject; mixing it with food makes it harder to attach to the stomach wall.

The SOMA is excreted after it delivers its drug. So far, Langer and Traverso have not seen any adverse effects from the device in the more than one dozen pigs that have swallowed it.

They plan on testing the device in more animals, including primates and dogs, to confirm its effectiveness, and have collaborated with the pharmaceutical company Novo Nordisk to refine the technology. If their early results are supported, the device could potentially be used to deliver a broad range of compounds that currently have to be injected or infused, including chemotherapy agents and even DNA and RNA for gene therapy purposes. “We see no reason why someday this couldn’t be used to deliver any protein to the body,” says Langer.

Contact us at letters@time.com.