NY1's Courtney Gross got an exclusive look at how the city makes sure the water at public beaches is clean enough to swim in.

It's early at Orchard Beach. Sunbathers have yet to descend.

"It's the best time to be out here," said Angela O'Haire, a scientist for the Department of Health.

O'Haire is participating in a weekly ritual. Wade in waist deep, take a sample. It's the practice of testing water quality at city beaches.

"We want to take the samples where, generally, people will be swimming," O'Haire said.

Fast forward a few hours. That's exactly what people are doing: swimming without hesitation.

"When the tide is out, the water is good. I go for a swim," said one swimmer.

It is slightly more complicated than that.

"We take the samples, bring them to the lab," O'Haire said. "We analyze them for that bacterium, and then depending on the levels, it indicates the water quality."

Which brings us to the Newtown Creek Wastewater Treatment Plant.

"This treated affluent goes into the East River," said Vincent Sapienza of the Department of Environmental Protection. "I should point out it has been fully disinfected."

We are here because the city has a combined sewer system. During heavy rains, its treatment system can get overwhelmed. Then, untreated sewage is dumped into the water. So to improve water quality at places like Orchard Beach, the city has to invest in infrastructure at the plant.

"New York City DEP has spent a lot of ratepayer money, more than $10 billion in the last decade, to reduce the amount of overflows, and the number of beach closures and advisories has been reduced over the last several years because of those investments," Sapienza said.

During the 2014 beach season, the Department of Health said it did not receive a single complaint saying someone got sick from the water. They also did not close any public beaches because of water quality issues. Those results are posted online for both private and public beaches.

Last year, Cedar Grove on Staten Island had the highest bacteria count of the public beaches.

As for our results at Orchard Beach this week, the water was clean.