Scientists flew a small drone over the blowhole of a few humpback whales in the US and Canada to collect the microbes living inside their breath. Sampling the community of microbes and bacteria living inside whales, called the microbiome, can help us better understand what makes a healthy whale, and what happens when a whale gets sick.

In the new research, published this week in the journal mSystems, scientists describe 25 species of microbes found in each humpback’s breath they sampled. Though they don’t know how exactly these organisms affect the health of the whales yet, many of the same microbes are often found in other marine mammals, suggesting they play a role in keeping the animals healthy. The study is also the latest example of how drones can help scientists in their quest to conserve species: in Hawaii, botanists are also using drones to hunt down rare plants in hard-to-reach places like cliffs.

Just like humans, animals have a microcosm of organisms inhabiting their bodies — which help keep them healthy. While we’re just starting to explore the human microbiome and its functions, very little is known about the microbiome of whales, especially inside their breathing organs, where a lot of infections occur. So researchers decided to sample the spray of water and snot coming out of the hole atop the whale heads, which the animals use to breathe at the surface.

Usually, whale breath is collected by approaching the animals — which can be up to 60 feet long, in the case of humpbacks — with a small boat, and then holding 23-foot pole with a collection plate above the blowhole. That’s obviously time-consuming and dangerous — for people and whales. In search for a better method, scientists used a remote-controlled hexacopter equipped with a petri dish. They then flew it a few feet over the blowhole of 26 healthy humpback whales off the coast of Cape Cod in the Atlantic Ocean and Vancouver Island in the Pacific.

The researchers found 25 species of microbes in the breath of all whales, including 20 that were previously found in other marine mammals. That suggests that those organisms are connected to the creatures’ respiratory health, according to the study, although it’s not exactly clear how. But understanding what makes the microbiome of a healthy whale can help us monitor their health, identify dangerous pathogens in the future, and possibly understand how pollutants in the water can affect whales.

That’s key for their conservation. A number of large whales are listed as endangered or critically endangered, including some humpback whale populations off the coast of northwest Africa and Central America.