By Charlotte Alter / Morgantown, W.Va.
Updated: November 19, 2015 8:00 AM ET

This is one of those parts of West Virginia where people fix one another’s tractors just because it’s neighborly. Nestled in the Appalachian Mountains, just 200 miles (320 km) from the D.C. headquarters of the Environmental Protection Agency, Dan Carder’s lab at West Virginia University in Morgantown is the folksy antithesis to the bureaucracy in Washington. It seems more like an auto-body shop than a science lab–Carder welded the pipes himself, the insulation is held together by foil tape, and the air smells like diesel fuel. Here, on threadbare chairs and a tiny budget, Carder and his team discovered the emissions problem in Volkswagen diesel cars that could cripple one of the world’s biggest automakers.

You might be wondering how a tiny team of engineers discovered the problem with Volkswagen before the EPA figured it out. After all, the EPA has an annual budget of over $8 billion, with $12 million specifically allocated to oversee compliance with transportation regulations. Yet Carder and his team found the emissions discrepancy on a $69,000 grant from the International Council on Clean Transportation (and that includes the cost of diesel fuel). The scandal could cost Volkswagen billions of dollars, since the company admitted to using defeat devices to cheat on emissions tests. And now that the EPA says it has found additional defeat devices on Porsche and Audi cars, it seems as if the problem might be even bigger than anyone initially imagined.

Carder and his team at WVU’s Center for Alternative Fuels Engines and Emissions (CAFEE) could have sprung from a 1940s comic book: a plucky gang of West Virginia scientists working together to expose the lies of a powerful German company. But this story is really about the future of cheating and the ability (or inability) of government regulators to catch it. Cars, like drugs or planes or so many other products we ask the government to regulate, keep getting more complex. Yet regulations often evolve more slowly than the products, which makes it easier for companies to cheat. That means innovators like Carder can get answers that government bureaucrats can’t–or won’t.

Carder and his team aren’t stopping at Volkswagen. They’ve invented a new device that could reduce the need for government oversight by crowdsourcing emissions data from thousands of cars and putting regulation in the hands of consumers.

But Carder is reluctant to call himself a whistle-blower, since he didn’t set out to take down Volkswagen. He says he and his team were just doing the same work they always do. “We may be David and they may be Goliath,” Carder says, “but we were never in a fight.”

Before the EPA found the defeat devices, before Volkswagen tried to expand diesel into the U.S. market, before anxiety about air quality reached a fever pitch, Dan Carder was just a kid who didn’t want to stray too far from home. He chose West Virginia University over a full ride at Virginia Tech so he could visit his family in nearby Mineral Wells. He stayed there for his master’s degree and then in 1998 joined the team that developed the Portable Emissions Measurement System (PEMS) to test diesel exhaust on the road.

Prepare for some déjà vu: in 1998, a group of seven heavy-duty diesel manufacturers–including Caterpillar, Cummins and Mack Trucks–got caught using defeat devices to pass EPA emissions tests. In addition to paying $83 million in civil penalties, the manufacturers were required to develop onboard emissions testing to help ensure that truck emissions were the same on the road as they were in the lab. So the manufacturers approached a team of engineers at WVU to help them monitor road emissions, and Carder was on that team. The WVU team helped develop PEMS for diesel but didn’t get a patent. (The EPA had already developed a similar technology and applied for a patent earlier that year.) Carder has an “oh well” attitude about it but notes that PEMS are now sold for hundreds of thousands of dollars.

Flash forward to 2013, when two of Carder’s students, Marc Besch and Arvind Thiruvengadam, headed from Morgantown to Los Angeles to test the emissions on light-duty diesel vehicles. They picked L.A. because diesel cars were easier to find there and because they could check their results on the dynamometer at the California air resources board. (A dynamometer is like a treadmill for engines.) They took a PEMS with them.

That PEMS, about the size of a picnic cooler, was sitting in the back of a Volkswagen Passat on the morning in 2013 when Besch and Thiruvengadam went out for a drive. As they sat in Los Angeles traffic, they knew that the diesel engine of their Passat was busy creating oxides of nitrogen, or NOx, a smog-forming pollutant. The two Ph.D. students also thought the Passat was using its selective catalytic reduction system, which reduces NOx emissions by at least 90% before the pollutant reaches the air.

But Besch and Thiruvengadam noticed that the NOx emissions were changing with the acceleration of the car instead of staying at a consistent low. When they went up a hill or sped up, the NOx would spike, making their laptop screens look like heart monitors when they should have been seeing a flat horizon. This was unexpected, since when they had tested the same cars in the lab at the California air resources board, the emissions had been below certification levels. “We weren’t required to figure out what it is. We were just there to report it,” Carder says. “We don’t know why, but it’s there.”

Once Carder and his team back in West Virginia published the discrepancy, the EPA and California air resources board investigated and found the cheat. It turns out that what happens inside some Volkswagen models in the lab is not what happens on the road. When a Volkswagen is tested on a dynamometer, the car’s computer system recognizes that it’s being evaluated and it goes on its best behavior: the selective catalytic reduction system, or SCR, triggers an injection of diesel exhaust fluid, which breaks down the NOx into harmless nitrogen and water. So when the SCR is working, NOx is reduced from 1,000 p.p.m. to just 5 or 10 p.p.m.

But when the cars are driven on the road, a defeat device keeps the SCR system from kicking in, allowing the NOx to pump into the atmosphere at alarming rates. NOx is linked to acid rain and global warming and can cause lung problems and other health conditions.

But if Volkswagen had already installed the SCR technology, why would it cheat by disabling the system? First of all, if the SCR were working correctly, it would hurt the car’s fuel economy and reduce the power of the engine, which is a major selling point for the cars. Second, the company may have been frustrated with U.S. air-quality standards, which are much stricter than European regulations. “There’s a pervasive mentality that these restrictions are ridiculous and we’re going to do what we want,” says Eddie Alterman, editor in chief of Car and Driver magazine. “There’s always been a kind of disdain for America at Volkswagen.” (A company spokeswoman says America remains “very important” to the company and it plans to invest more than $7 billion the U.S. in the next four years.)

Carder thinks the defeat device could have been a by-product of design constraints and marketing concerns. In order for SCR to work correctly, you need enough diesel exhaust fluid, or DEF, onboard. That means either carrying a big tank of DEF inside the car, which would take up valuable interior real estate and could require costly redesigns, or asking drivers to frequently go back to the dealer to get the DEF refilled. “You’ve now told the consumer that there’s something else you’ve got to worry about,” Carder says.

The EPA issued a notice of violation to Volkswagen on Sept. 18, accusing the company of installing a defeat device that caused NOx emissions at 40 times the standard limit. Since then, Volkswagen stock has plummeted, the company has set aside about $7 billion to ensure compliance, and it could owe at least $18 billion in EPA fines. Then, on Nov. 2, the EPA announced that even more defeat devices had been found, this time in Audi and Porsche models. (Volkswagen says it has stopped selling those cars and is working to “clarify” the finding.)

If rules are meant to be broken, then regulations are meant to be flouted. Ever since the U.S. started regulating interstate railroads in the 19th century, the government has at times positioned itself as the watchdog of public interest, though the “public interest” has sometimes been driven most by the needs of the private sector. Still, Americans expect regulatory agencies to make sure the products they use are safe and ethical and, most important, do what they say they’re doing. But some companies thrive on the ambiguity of the regulations and spend millions of dollars to edit and tweak rules as they are drafted and enforced.

The tobacco industry, for example, has long sold small brown cigarettes as “cigars” because they’re subject to fewer regulations (although the FDA has proposed new rules to address the loophole). Defense contractors enjoy a different advantage: at the Pentagon, billion-dollar weapons are often tested in highly controlled environments that have often been shown to be favorable to contractors if not exactly rigged. That can speed their way from the blueprint to the battlefield.

Automakers enjoyed similar leeway at the EPA, which until recently had fairly predictable evaluations and even allowed automakers to conduct some of their own testing and report the results. “It’s like knowing the questions that are going to be on a test before you take it,” Carder says. So if the EPA already knew that road testing was different from dynamometer testing from its 1998 experience, why were the Volkswagen cars tested only in a lab?

“We can’t set a standard without a rigorous and repeatable test procedure. Otherwise we can’t compare our results with auto-industry test results,” explains Chris Grundler, director of the Office of Transportation and Air Quality at the EPA. He noted that the EPA does do road testing but mostly on heavy-duty diesel trucks, since they account for the “lion’s share” of emissions. (Only 0.01% of NOx comes from light-duty cars.) In the aftermath of the Volkswagen scandal, the EPA says it has incorporated on-road testing of passenger cars, added testing for defeat devices and plans to mix up its testing so that manufacturers don’t know exactly how vehicles will be evaluated.

The testing has to be standardized in order to be fair to carmakers that have billions of dollars at stake. But that brings up questions about the relationship between the regulators and the regulated: Are government agencies meant to sniff out corruption or to guide corporations down the right path? “They don’t see themselves as law-enforcement agents. They see themselves as consultants,” says Ralph Nader, a consumer advocate and former presidential candidate who helped make seat belts an industry standard. “They see themselves as nudgers at best.”

There’s something about Carder that’s reminiscent of an old-fashioned dad from a kinder, more capable America. He climbs trees to shoot game, leaving his cell phone at home. He hunts bears with a bow and arrow and eats the meat for dinner–bear, he says, “tastes greasy.” And on the morning he found out that his research had led the EPA to condemn Volkswagen for cheating, he had to wipe engine grease off his hands before he could pick up his phone. He spent the next weekend ignoring the media firestorm, opting instead to fix a truck for a friend of a friend, free of charge.

Carder feels ambivalent about modern technology and says kids are too fixated on their phones to tinker with engines the way he did. So it’s a little ironic that his next invention may be applying Internet-style crowdsourcing to engine emissions. Carder and his team know it’s impractical to expect all drivers to carry a noisy PEMS in their backseat, so they’re developing a much smaller measurement system that can be attached to the tailpipes of thousands of cars. The AirCom would be slightly less accurate than a lab test but much more comprehensive, Carder says, which would give air-quality experts a better idea of what’s actually in the atmosphere.

The AirCom is a small block about the size of a playing card that can fit in the palm of your hand. It could work like traffic-monitoring app Waze, but for emissions: the device could tell drivers when they enter a high-emissions area and either suggest they change course or adjust the fuel efficiency of the car. And Carder’s teammate Greg Thompson says they envision a system in which drivers could even get a break on the cost of their registration if they agreed to put the device on their tailpipe.

Carder says he applied for EPA research funding involving the AirCom four times from 2011 to 2015, including twice for funding specifically to develop this device. He was denied every time.

The irony is that democratizing on-road testing would make it much harder for manufacturers to cheat the EPA. “When you connect something to a tailpipe, there’s virtually no way to detect that,” Carder says. “So whatever you see is what you’re getting.” This time, he says, they’ll get a patent.

Correction: The original version of this article incorrectly named the Volkswagen model tested by Carder that uses Selective Catalytic Reduction emissions regulation system. It is the Passat.

Write to Charlotte Alter at charlotte.alter@time.com.

This appears in the November 30, 2015 issue of TIME.

SPONSORED FINANCIAL CONTENT

Read More From TIME

EDIT POST