Two engineers at the University of Oregon are facing criminal charges in federal court for scamming Apple out of almost a million dollars in iPhone replacements.  The students claim to have pulled off a convoluted scheme to wring Apple of the cash by using counterfeit devices and exploiting Apple’s return policy.

The two students received a shipment of thousands of counterfeit iPhones from China and then sent them in for Apple to repair or replace, claiming that the knockoff phones wouldn’t turn on. In many cases, Apple did replace the counterfeit goods with real iPhones, which cost the company an estimated $895,800.

One of the main reasons they were able to pull this off is because the Apple store employees couldn’t verify the authenticity of the devices since they would not turn on. Apple at the time didn’t require proof of purchase to replace the phones so the men were claiming that they were covered under product warranty. They submitted 3,069 warranty claims and Apple granted 1,493 replacement iPhones. With the estimated value of $600 per phone, Apple lost nearly $900,000 from this scheme.