The Supreme Court on Wednesday allowed a case suing the federal government to move forward but rejected a class action suit against Comcast Corp.

In a decision that could make it harder to file that type of lawsuit in federal court, the court overturned a lower court decision to certify as a class Comcast customers who say the cable provider’s monopoly in the Philadelphia area allowed it to raise prices unfairly.

Justice Antonin Scalia said in a 5-4 decision that the customers need to be able to show that they can tie a single theory of how they were harmed to a specific calculation of damages for class certification. The Comcast subscribers had a model that would have shown damages, but it showed $875 million under four theories.

Only one of their theories was accepted by the lower courts, so there is no showing of how much in damages was attributable to that theory, Scalia said.

“It is clear that, under the proper standard for evaluating certification, respondents’ model falls far short of establishing that damages are capable of measurement on a classwide basis,” Scalia said.

Also Wednesday, the court ruled unanimously that the federal government can be sued for abuse claims against prison guards.

The high court accepted the appeal of Kim Lee Millbrook, a federal prisoner who had accused guards of sexually assaulting him in 2010. Millbrook sued the federal government for negligence, assault and battery, but the lower courts threw out his lawsuit.

Justice Clarence Thomas wrote that the Federal Torts Claim Act’s waiver of government immunity against lawsuits “extends to acts or omissions of law enforcement officers that arise within the scope of their employment, regardless of whether the officers are engaged in investigative or law enforcement activity, or are executing a search, seizing evidence or making an arrest.”