Imagine, if you will, that there is a shadow government.

The actual government, the administration of Donald Trump, is coming off the worst week of his presidency, although there haven’t been any smooth weeks. Trump’s top legislative priority, repealing and replacing the Affordable Care Act, seems dead for the moment. (Tax reform? Forget it.) His administration has set a new standard for chaos and dysfunction, rolling through staffers the way other administrations run through, well, legislative initiatives. Trump’s foreign policy remains inchoate and ineffective. Meanwhile, a special counsel investigation looms over the entire administration, threatening both its legitimacy and legal jeopardy for some of its members.

Things are going considerably better for the shadow government. With the Trump administration’s chaos sucking up all the attention, it’s been able to move forward on a range of its priorities, which tend to be more focused on regulatory matters anyway. It is remaking the justice system, rewriting environmental rules, overhauling public-lands administration, and greenlighting major infrastructure projects. It is appointing figures who will guarantee the triumph of its ideological vision for decades to come.

The trick here is that the administration and this shadow government are one and the same. Even as the public government sputters, other elements of the Trump administration are quietly remaking the nation’s regulatory landscape, especially on the environment and criminal justice.

There is so much attention paid to the chaos in the executive branch that it’s easy to come to believe that Trump is getting nothing whatsoever accomplished. Even for people who don’t support the president’s agenda—especially for them, in fact—it is useful to step back occasionally and take stock of what this presidency is doing to work toward its goals.

Trump’s complaints that the press is ignoring his victories in favor of covering controversies ring hollow. You can’t very well go around setting things on fire and then asking why the press keeps covering the fires. But warnings that the Trump administration is doing X to distract from Y seem misguided for a couple of reasons—one being that they ascribe a greater organization that the White House evinces in any other sphere, and another being that the supposedly distracting stories are often just as catastrophic. But the large-scale disasters do keep attention focused away from what smaller agencies are doing, as Ben Carson acknowledged recently.

“Let me put it this way,” the secretary of housing and urban development told the Washington Examiner. “I'm glad that Trump is drawing all the fire so I can get stuff done.”

Meanwhile, Trump continues to make preposterous claims. His assertion, at the six-month mark of his presidency last month, that he’d signed more bills than any other president over that stretch earned a snarky rejoinder even from The New York Times. But that is small consolation for progressive environmentalists, public-lands advocates, LGBT activists, and criminal-justice reformers. The list of accomplishments fall short of what Trump promised, but many of them are still quite consequential, with effects to be felt for decades to come. That’s one reason this sort of devil’s advocate exercise is important, although when I tried it in January it was not well received (except by the White House). Still, in the spirit of EPA Administrator Scott Pruitt, who intends to establish a “red-team blue-team” exercise to investigate whether climate change is actually happening, let’s consider the Trump administration’s accomplishments. Spoiler alert: like climate change, they’re real.

One of the two biggest victories has come on border security, which was one of Trump’s top campaign priorities. Border crossings have already plummeted, suggesting that rhetoric making it clear to immigrants that they are not welcome is effective in its own right. Customs and Border Protections report that apprehensions of unauthorized people are down nearly 20 percent from the same time in 2016. (Trump continues to radically exaggerate these figures, though.) This decline has occurred despite Trump being foiled on his actual policy proposals at the border. Construction hasn’t begun on his border wall yet, and federal courts have repeatedly smacked down his Muslim travel ban.

That said, he did get one good result in courts—and that points to a second area of success. The Supreme Court allowed parts of the travel ban to go forward, in a victory that would not have happened without Neil Gorsuch on the court, filling a seat that under all previous customs would have been filled by Barack Obama’s appointee Merrick Garland. Given his legislative struggles, the most enduring Trump victories are likely to come in the judicial branch.

Trump may get to appoint several more justices to the high court. And in the meantime, he’s filling up lower courts with lifetime appointees. As the veteran Democratic official Ron Klain wrote recently, “A massive transformation is underway in how our fundamental rights are defined by the federal judiciary. For while President Trump is incompetent at countless aspects of his job, he is proving wildly successful in one respect: naming youthful conservative nominees to the federal bench in record-setting numbers.”

There are the quiet, far-reaching changes. Getting back to Pruitt, the environment is one of the places where the Trump administration has had its largest impact. The most prominent move was Trump’s June 1 announcement that the U.S. will withdraw from the Paris climate accord. But the EPA is moving on other fronts as well. It’s working to dismantle Barack Obama’s Clean Power Plan, a signature policy aimed at reducing greenhouse-gas emissions. In June, following a February executive order from Trump, the EPA began the process of rescinding the 2015 Waters of the United States rule, which aimed at protecting smaller bodies of water and streams in the same way that larger ones had been. In December, in the closing weeks of his administration, Obama banned drilling in the Arctic and parts of the Atlantic Ocean; the Trump administration promptly set about undoing that ban. (How interested oil companies will be remains to be seen.)

The New York Times found in June that Pruitt’s EPA “has moved to undo, delay or otherwise block more than 30 environmental rules, a regulatory rollback larger in scope than any other over so short a time in the agency’s 47-year history.” And it might have done more if not for constraints imposed by judges. EPA tried to abandon an Obama-era rule on methane emissions, but a court on Monday forced it to continue enforcing the rule.

Other agencies are also in on the environmental deregulation act. The State Department reversed an Obama-era decision, clearing the way for the Keystone XL pipeline to begin construction. The Interior Department is considering reversing a rule on fracking on public lands, and might also reverse some equipment regulations on offshore drilling equipment implemented after the 2010 Gulf oil spill. The department has rolled back a ban on coal mining on public lands.

Despite Trump’s recent, very public dissatisfaction with Attorney General Jeff Sessions, the Justice Department has been particularly effective in changing the policy landscape. Sessions, a long-time conservative crusader for tough-on-crime policies, has moved to enforce them. Over the objections of libertarians and civil libertarians, and contrary to a bipartisan move toward criminal-justice reform over the last decade, he strengthened the federal government’s power of civil-asset forfeiture, a practice that allows police to seize cash and goods from people suspected (but not convicted) of crimes, and one that is often abused. Also contrary to recent trends, he has reversed Obama-era policy by encouraging prosecutors to pursue the harshest sentences for low-level drug offenses. Even if Sessions doesn’t last long in his job, those handed long prison terms will still be behind bars.

Although the Justice Department had staunchly opposed a Texas voting law that has repeatedly been smacked down by courts as discriminatory, Sessions switched the department’s position, and it has now told courts the law ought to be allowed to remain. The attorney general has also sought to cut off funding to so-called sanctuary cities, though his legal authority to do so is disputed.

Curiously, since he campaigned as an atypically LGBT-friendly Republican, Trump has also made a range of changes on gay issues. Last week alone, the Justice Department announced that sexual orientation was not covered by Section VII, and the president said that transgender people would not be allowed to serve in the military. The administration has also rejected Obama-era protections for transgender students.

Trump continues to boast about the economy, and in particular the booming stock market and a sinking unemployment rate, though both are the continuation of trends that started years ago, and presidents tend to have limited control over both. The administration has sought to loosen business regulations in several respects, however, attempting to peel back parts of the Dodd-Frank financial-regulation law and undermine the Consumer Finance Protection Bureau.

These less heralded, less noticed, and sometimes obscure changes to federal policy are more fragile than major legislation; just notice how many of them involve reversing Obama-era decisions that were implemented solely through the executive branch. But their effects are no less real, and in many cases they’re drastic.

There is some irony to Trump’s greatest victories coming through the executive branch, and it in turn reveals just how far the president’s efforts have fallen short of his ambitions so far. The White House bragged in July that it had withdrawn regulations and delayed another 391. But numbers like that are only mildly illuminating in aggregate, and when chief strategist Steve Bannon vowed to bring the “destruction of the administrative state,” this kind of bean-counting and bureaucratic tinkering around the edges can hardly be what he had in mind.