Maybe the only silver lining of the 2008 financial crisis was its prompting of much-needed congressional action to make the financial system safer and fairer, ultimately resulting in the passage of the Dodd-Frank Act. As part of this law, Congress created the Consumer Financial Protection Bureau (CFPB) to protect people from harmful and abusive financial practices. And that is exactly what the consumer bureau has done; in just six years, the agency has secured nearly $12 billion in relief for 27 million consumers.

Yet the consumer bureau has been under perpetual attack by many in the financial sector and by a significant number of congressional Republicans. The Trump Administration has become, not surprisingly, just the latest in a long line to join the attack: The Trump Justice Department abandoned the department’s prior support for the Consumer Financial Protection Bureau, and threw its weight behind a private financial company currently challenging the bureau’s constitutionality.

In response to this pending case, I recently joined others in filing a brief in support of the consumer agency. The crux of the constitutionality question is this: Can an independent agency be run by a single director, or must it be run by a commission? The private litigant, which had been subject to a CFPB enforcement action for alleged violations of the Real Estate Settlement Practices Act, sought to void the enforcement action on the grounds that the structure of the CFPB is unconstitutional. The constitutional question is part of a broader fight that began during the debate over Dodd-Frank itself over whether to create the new consumer agency at all.

Opponents charge that the consumer bureau is too powerful because it is independent from the White House—its director can only be removed “for cause,” unlike some agency heads, who work at the pleasure of the President, such as the Secretary of Housing and Urban Development. This question of the President’s ability to remove the head of an independent agency may seem obscure, but it has some notoriety as a legal question, owing to a landmark 1935 case stemming from when Franklin D. Roosevelt tried to fire a Federal Trade Commission official. The Supreme Court held then that Congress could protect independent agencies from presidential impulses by including a “for-cause” removal provision in an agency’s enabling statute.

There is no one-size-fits-all approach to creating a new agency, and Congress has properly experimented with a wide variety of agency designs since America’s founding. Currently, a range of structures and organizational features exist across government agencies. Some, like the CFPB, the Comptroller of the Currency, and the Social Security Administration, are run by a single director, while others have commission structures of different shapes and sizes. Some agencies have fixed terms for directors and statutory removal protections, while others do not. Agencies are funded through a wide variety of mechanisms, including fees, fines and penalties, deposit insurance premiums, earnings on reserves, revolving funds, and permanent spending authorizations; in fact, most federal spending today does not occur through annual appropriations.

To promote the accountability and effectiveness of the consumer bureau, Congress established it as an independent agency with a single director. Congress also provided that the director could not be removed except for good cause. And as Congress has with other bank regulators such as the Federal Deposit Insurance Corporation, it provided the consumer agency with a funding stream without requiring annual congressional appropriations.

In other words, Congress sought to make the consumer bureau truly independent—to minimize the risk that the agency would be “captured” by the financial firms it regulates through pressure on Congress or on the President.

However, Congress wanted to make sure the consumer bureau would be, nonetheless, accountable to the public through their elected officials and other means. As such, it has been subject to regular scrutiny by Congress, including regular reporting and more than 60 hearings thus far at which representatives of the agency have testified. And there are many other ways the agency is held accountable: unlike other bank regulators, it is subject to a statutorily imposed budget cap; it must undergo Government Accountability Office audits and Federal Reserve Board Inspector General oversight; it is subject to the strictures of the Administrative Procedures Act; by statute it must use cost-benefit analysis; and, as with other agencies, the bureau’s actions are reviewable by the courts. Uniquely, the consumer agency’s rules are subject to a potential veto by other regulators on the Financial Stability Oversight Council. The consumer bureau shares enforcement with state attorneys general, and must coordinate with the Federal Trade Commission and bank regulators, providing another check on its actions.

The consumer bureau is also directly accountable to the public in a number of ways. The bureau’s consumer complaint database allows the public the opportunity to provide input directly into the agency’s decision-making process. The bureau is required to consult with the public and small businesses; to establish and consult with advisory boards, including those representing military families, veterans, and older Americans; to have a public ombudsman for student loans; and to conduct regular public reviews of markets and its regulations. The agency has also held 38 public field hearings around the country since its inception.

These measures provide constitutionally sufficient and effective accountability to the public. The Court should not re-write the Dodd-Frank Act to make the CFPB’s director removable at will, and the Trump Administration should, in any event, not fire its highly able and distinguished director, Rich Cordray, who is doing so much to protect American consumers. The Consumer Financial Protection Bureau should be allowed to do its job.