Researchers have figured out how to monitor the genetic health of endangered whale sharks without ever touching them—by testing the waters they swim in. They described their progress in the journal Nature Ecology & Evolution.

Keeping tabs on endangered animals is an essential part of keeping them safe. Yet our current monitoring methods are imperfect at best. Some, like aerial monitoring, depend on clear weather and good visibility. Others, like tagging, can actually hurt [PDF] the animals they’re meant to protect. It’s time to find new ways to look out for our fellow animals.

One international research team came up with an interesting idea: rather than taking tissue samples from whale sharks’ bodies, what about testing the environment in which they swim?

Study author and geneticist Philip Francis Thomsen of the Natural History Museum of Denmark has been investigating the various uses of environmental DNA (eDNA) for the last few years. He and his colleagues found that testing the water is a great way to help scientists identify and count its piscine inhabitants. But they’d never used eDNA to examine a given fish population’s genetics—that is, how the members of the group are related to one another and others in their species.

Thomsen and an international team of his peers traveled to a site in the Persian Gulf where whale sharks like to congregate. First, they counted the number of fins at the surface to estimate how many sharks were around. Then they collected 20 small samples of seawater and small tissue samples from the sharks so they could compare their results.

They sequenced the DNA found in the tissue samples and the DNA in the water and found that the two yielded similar results. By combining these genetic family trees with their observations of the site, the researchers were able to estimate the number of sharks present. They found that the sharks in the gulf were more closely related to other populations in the Indian and Pacific Oceans than they were to Atlantic whale sharks.

There’s more work still to be done, the authors write, but this hands-off method shows a lot of promise. Whale sharks, if you're reading this: We'll keep you posted.