HAMBURG, N.Y. — There's nothing better than taking a cool dip during a heat wave.

But there's never a guarantee a given beach will be open.

Woodlawn Beach in Western New York is a good example. Already this year it’s been closed nearly a dozen times for potential high levels of E. coli, a common type of bacteria that can cause stomach issues. Officials found out too late in the day that the water was fine for swimming.

Ruth Richardson, an associate professor of civil and environmental engineering with Cornell, and students Nate Barott and Zsofia Szegletes have been using state beaches as their lab since June in hopes of changing that. 

"We are working on a rapid DNA-based tool for detecting fecal indicator bacteria,” Richardson explained.

Right now it takes 24 to 30 hours to get test results back. In the meantime, beaches are closed out of an abundance of caution to help protect the public health. Beaches won't reopen until officials receive the all clear. 

"The test that we are doing Tuesday, from taking the sample of water to getting the answer is about an hour and a half," Richardson said.

The device is from a Philadelphia-based company called Biomeme. It was created for the fishery industry to monitor fish pathogens and watch for invasive species. Richardson was put in touch with the company by a former student. She thought Biomeme could do more.

So far she’s been right. This is the second round of testing she and her team have completed. Richardson says Biomeme is matching current lab tests 90 percent of the time.

The million dollar question is when this testing system could this be approved by the FDA. Richardson says it could take a few years, but she’s hopeful one day it will be another tool used to keep swimmers safe.