Love the beach but fear sharks? Your risk of dying in a shark attack is infinitesimal—roughly 1 in 3.7 million—but it’s still a risk nonetheless. Scientists say white sharks are becoming more prevalent along California’s coast thanks to federal protections, and on the opposite side of the country, Cape Cod recently saw its first fatal shark attack in more than 80 years.

A new proof-of-concept study, published in Frontiers in Marine Science, could shed new light on what's lurking beneath the surface. Researchers from UC Santa Barbara, the U.S. Geological Survey, and partner universities theorized that environmental DNA (eDNA)—an organism's cast-off bits of genetic material—could show the presence of white sharks in a particular part of the California coast.

White sharks forge distinctive trails by shedding skin and discharging mucus, feces, and other genetic markers in seawater. Researchers created a species-specific test for white shark eDNA, then rode stand-up paddleboards to four sites beyond the line of surf to collect water samples. After analyzing the samples in the lab, they found white shark eDNA in two samples from areas where the fish were known to gather, and no eDNA in the other two samples from sites where sharks hadn't been observed. The results from the preliminary experiment showed that the new test could accurately identify the sharks' eDNA—and that might save a surfer in the future.

"One of the goals of this research is for a lifeguard to be able to walk down to the shore, scoop up some water, shake it, and see if white sharks are around," Kevin Lafferty, lead author of the study, said in a statement.

The use of eDNA has some limitations. Ocean currents can cause eDNA to drift, and that genetic information can degrade quickly in the surrounding environment. “Another challenge is that eDNA might persist in the ocean environment for days, meaning a positive detection might indicate a species that is no longer locally present,” the researchers write in their paper. Still, they say the development is a step in the right direction for better shark monitoring and conservation efforts.