A New York judge has cleared the way for residents of a troubled nursing home to pursue a class-action lawsuit against its former owners.

Onondaga County Supreme Court Judge Anthony Paris agreed Wednesday to certify the class, which could include more than 1,000 residents, former residents or survivors of those who had lived at the former James Square facility since 2015.

A suit brought by attorney Jeremiah Frei-Pearson claims that short-staffing harmed residents, “some of whom were left lying in their own feces and urine for hours,” according to Syracuse.com.

“We look forward to taking the former owners for every nickel,” Frei-Pearson told media gathered outside the courtroom.

The facility had gained notoriety for several lapses in recent years, including a management shakeup in March, last August’s resuscitation of a resident with a DNR and Legionnaires cases in 2017.

Clinton Square Operations bought the facility in December and renamed it Bishop Rehabilitation & Nursing Center. Frei-Pearson already reached an agreement with Clinton Square, in which the new owner will pay $495,000, which includes $300,000 to the plaintiffs. Clinton Square also agreed to increase hiring and make other changes.

Syracuse.com reported that previous owners River Meadows LLC, James Square Nursing Home Inc. and 918 James Receiver LLC have not settled. They companies argued against the class certification, noting the peculiarities of multiple ownerships and several existing individual lawsuits.

The state Attorney General’s Office raided the nursing home in June 2017 and seized records as part of an ongoing investigation into patient care.