
542 F.3d 913 (2008)
William McNeir RICHMOND, Appellant,
v.
NEW HAMPSHIRE SUPREME COURT COMMITTEE ON PROFESSIONAL CONDUCT, Appellee.
No. 07-2671.
United States Court of Appeals, First Circuit.
Heard April 10, 2008.
Decided September 19, 2008.
*914 Ralph P. Holmes, with whom Joseph A. Foster, Cheryl C. Deshaies, and McLane, Graf, Raulerson & Middleton, P.A., was on brief for the appellant.
Bruce A. Harwood, with whom Jeana Kim Reinbold and Sheehan Phinney Bass & Green, P.A., was on brief for the appellee.
*915 Before TORRUELLA, CUDAHY,[*] and LIPEZ, Circuit Judges.
CUDAHY, Senior Circuit Judge.
The New Hampshire Supreme Court twice disciplined attorney William Richmond for violating provisions of the New Hampshire Rules of Professional Conduct (the Rules). The New Hampshire Supreme Court first suspended Richmond and later disbarred him; it also ordered him to reimburse the New Hampshire Supreme Court Committee on Professional Conduct (the Committee) for the costs of bringing the disciplinary proceedings against him.
While his second disciplinary proceeding was still pending, Richmond filed for Chapter 7 bankruptcy. The Committee filed a complaint in the bankruptcy court, arguing that the cost assessments were excepted from discharge under 11 U.S.C. § 523(a)(7) (2006), which makes non-dischargeable any debt that is "a fine, penalty or forfeiture payable to and for the benefit of a governmental unit, and is not compensation for actual pecuniary loss." Richmond likened the assessments to cost awards that are automatically granted to prevailing parties. The Committee argued that the cost assessments were sanctions and that their primary purpose was to deter attorney misconduct and protect public faith in the judicial system. Both the bankruptcy court and the district court sided with the Committee and found the debts non-dischargeable. We affirm.

I.
Attorneys in New Hampshire are "officers of the court," and they play a critical role in the "administration of justice" in that state. N.H. SUP.CT. R. 37(1)(b); accord Bryant's Case, 24 N.H. 149, 154, 4 Fost. 149 (1851). "The power to discipline and control the actions of officers of the court ... [is] absolutely necessary for [New Hampshire courts] to function effectively and to carry out [their] mandate to preserve the judicial system." Coffey's Case, 157 N.H. 156, 949 A.2d 102, 113 (2008) (citations and quotations omitted). Because the proper practice of law is "intimately connected with the exercise of judicial power," the New Hampshire Supreme Court has inherent power to regulate the legal profession. In re Petition of New Hampshire Bar Ass'n, 151 N.H. 112, 855 A.2d 450, 454 (2004) (quoting Wallace v. Wallace, 225 Ga. 102, 166 S.E.2d 718, 723 (1969)); accord In re Ricker, 66 N.H. 207, 29 A. 559, 562 (1890). It also has the statutory and constitutional power to do so. See N.H. Const. pt. 2, art. 37; N.H.REV.STAT. § 490:4 (2007).
Pursuant to its authority to regulate the legal profession, the New Hampshire Supreme Court promulgated the New Hampshire Rules of Professional Conduct, which "establish the boundaries of permissible and impermissible lawyer conduct." See N.H. R. PROF. CONDUCT, Statement of Purpose. The Rules cover everything from diligence and candor toward the tribunal to confidentiality and conflicts of interest. See, e.g., N.H. R. PROF. CONDUCT 1.3, 1.6, 1.8, 3.3. With the privilege of practicing law in New Hampshire comes the concomitant responsibility of abiding by the standards of professional responsibility embodied in the Rules.
The New Hampshire Supreme Court enforces these Rules. To assist it with the task of administering its disciplinary function, the New Hampshire Supreme Court created the Committee. See N.H. SUP.CT. R. 37(3). The Committee investigates complaints against lawyers and makes recommendations *916 to the New Hampshire Supreme Court regarding appropriate disciplinary actions. See id., Rule 37(3)(d)(1). The Committee is funded through both an annual assessment of attorneys imposed by an order of the New Hampshire Supreme Court and by the Court's Character and Fitness Committee. See id., Rule 37(1)(16).
An attorney who fails to abide by the standards of professional conduct is subject to discipline, including disbarment, suspension, public censure and reprimand. See id. Rule 37A(1)(e)(1). Rule 37(16) also provides that "[a]ll expenses incurred by the committee and by bar counsel in the investigation and enforcement of discipline shall be paid by the New Hampshire Bar Association in the first instance but may, in whole or in part, be assessed to a disciplined attorney to the extent appropriate." See id., Rule 37(16). Sanctions are "not intended as a mode of inflicting punishment." Kersey's Case, 150 N.H. 585, 842 A.2d 121, 122 (2004); O'Meara's Case, 150 N.H. 157, 834 A.2d 235, 237 (2003). Instead, they serve an important public function in that they "protect the public, maintain public confidence in the bar, preserve the integrity of the legal profession, and to prevent [unprofessional] conduct in the future." Kersey's Case, 150 N.H. 585, 842 A.2d at 122.
Although the sanctions can be harsh, the New Hampshire Supreme Court has consistently stated that attorney disciplinary proceedings are not criminal proceedings. Kersey's Case, 150 N.H. 585, 842 A.2d at 122; O'Meara's Case, 150 N.H. 157, 834 A.2d at 237. At the same time, the New Hampshire Supreme Court has recognized that attorney disciplinary proceedings are not civil or administrative either: they are "special in character." In re Burling, 139 N.H. 266, 651 A.2d 940, 942 (1994).

II.
William Richmond was admitted to the practice of law in New Hampshire in 1996. The Committee has twice filed petitions with the New Hampshire Supreme Court requesting that Richmond be disciplined for committing professional misconduct.
The Committee filed its first petition on March 6, 2003. The petition alleged, inter alia, that Richmond had failed to recognize plain conflicts of interest and negligently held himself out to be an expert in security law issues. The Court referred the petition to a judicial referee, who found that Richmond had violated numerous Rules and recommended suspension. After considering both mitigating and aggravating factors, the New Hampshire Supreme Court upheld the referee's findings and suspended Richmond from the practice of law for six months. It also ordered Richmond to "reimburse the committee for the costs of investigating and prosecuting this matter." See Richmond's Case (Richmond I), 152 N.H. 155, 872 A.2d 1023, 1031 (2005). This sum totaled more than $13,776.19.
The Committee filed its second petition on November 13, 2003, again alleging that Richmond had committed numerous Rules violations. The matter was again referred to a judicial referee, who recommended that Richmond be disbarred. The New Hampshire Supreme Court disbarred Richmond and again ordered him to "reimburse the committee for all of its expenses, including legal fees, incurred in investigating and prosecuting this matter." Richmond's Case (Richmond II), 153 N.H. 729, 904 A.2d 684, 697 (2006).
Richmond went bankrupt and sought Chapter 7 protection. The Committee filed a complaint in bankruptcy court pursuant to § 523(a)(7), seeking to except *917 from Richmond's discharge the cost assessments owed to the Committee from Richmond I and Richmond II. The parties were able to stipulate to the great majority of material facts. The Committee filed a motion for summary judgment, and the bankruptcy court found that the cost assessments were non-dischargeable. Following the Supreme Court's decision in Kelly v. Robinson, 479 U.S. 36, 43, 50, 107 S.Ct. 353, 93 L.Ed.2d 216 (1986), the bankruptcy court analogized the cost assessments in the attorney disciplinary proceedings to restitution awards and cost assessments in the criminal setting. The bankruptcy found that the primary purpose of the costs sanction was to further the state's interest in protecting the public, to deter unprofessional conduct and to rehabilitate the offending attorney. The cost assessments were, thus, non-dischargeable under § 523(a)(7). The district court affirmed, and this appeal followed.

III.
Under the Bankruptcy Code, a Chapter 7 debtor is generally discharged from all debts except those that are designated as non-dischargeable under § 523(a)(7). Section 523(a)(7) makes non-dischargeable any "fine, penalty or forfeiture payable to and for the benefit of a governmental unit, and [which] is not compensation for actual pecuniary loss." 11 U.S.C. § 523(a)(7). We have interpreted this statutory provision to create a three-part test: the Committee must show that a cost assessment in a New Hampshire attorney disciplinary proceedings is (1) "a fine, penalty, or forfeiture," (2) "payable to and for the benefit of a governmental unit," and (3) "not compensation for actual pecuniary loss." Whitehouse v. Laroche, 277 F.3d 568, 573 (1st Cir.2002).
Because the language of § 523(a)(7) is "subject to interpretation," the "text is only the starting point" of our analysis. Kelly, 479 U.S. at 43, 50, 107 S.Ct. 353. "In expounding a statute, we must not be guided by a single sentence or member of a sentence, but look to the provisions of the whole law, and to its object and policy." Id. at 43-44, 107 S.Ct. 353 (quoting Offshore Logistics, Inc. v. Tallentire, 477 U.S. 207, 222, 106 S.Ct. 2485, 91 L.Ed.2d 174 (1986)). Exceptions to discharge under the Bankruptcy Code are often narrowly construed to further the Code's purpose of giving a "fresh start" to honest debtors. See Palmacci v. Umpierrez, 121 F.3d 781, 786 (1st Cir. 1997). The Code, however, is "not intended to be a haven for wrongdoers." U.S. Dept. Of Hous. & Urban Dev. v. Cost Control Mktg. & Sales Mgmt. of Va., Inc., 64 F.3d 920, 927 (4th Cir.1995). We review the factual findings of the bankruptcy court for clear error and its legal conclusions de novo. See Palmacci, 121 F.3d at 785. Because the factual basis of this case has been stipulated by the parties, our review is largely de novo.
The parties have stipulated that the cost assessments are "payable to and for the benefit of a governmental unit." The only points in dispute are whether the cost assessment qualifies as "a fine, penalty, or forfeiture" and whether it is "compensation for actual pecuniary loss." We discuss the two disputed questions in turn.

A. FINE, PENALTY, OR FORFEITURE
Richmond first contends that a cost assessment levied in a New Hampshire attorney disciplinary proceedings is not "a fine, penalty, or forfeiture" within the meaning of § 523(a)(7). Instead, Richmond argues, the cost assessment is similar to costs awarded to prevailing parties *918 under fee-shifting statutes. The disciplinary assessments are, Richmond claims, imposed automatically. Further, Richmond argues that the disciplinary costs are not "fines" or "penalties" because they are not punitive in nature. He notes that cost assessments are not found in the same section of the Supreme Court Rules as other "sanctions" such as disbarment, suspension and censure. More importantly, Richmond notes that the New Hampshire Supreme Court has repeatedly stated that attorney disciplinary proceedings are not intended to "punish" the disciplined attorney.
Despite Richmond's assertions, however, cost assessments are not automatically awarded in New Hampshire attorney disciplinary proceedings. Rule 37(16) makes it unmistakably clear that they are discretionary: the costs of investigating and enforcing Rules violations "may, in whole or in part, be assessed to a disciplined attorney to the extent appropriate." See N.H. SUP.CT. R. 37(16). All the tell-tale signs of discretion are present here: not only does Rule 37(16) state that the Court "may" assess the costs, it states that the Court may do so "in whole or in part" and only "to the extent appropriate."
The discretionary nature of New Hampshire cost assessments strongly suggests that they should be viewed as penalties. While Richmond believes that the costs are awarded in a perfunctory manner, the New Hampshire Supreme Court has stated on several occasions that the cost assessments are viewed as part of the sanction. See, e.g., Morgan's Case, 143 N.H. 475, 477, 727 A.2d 985 (1999) (noting that "a conditionally delayed two-year suspension, coupled with an obligation to pay costs, will protect the public, maintain public confidence in the bar, preserve the integrity of the legal profession, and prevent similar conduct in the future"). Further, the New Hampshire Supreme Court has made clear that the "appropriateness" of the costs sanction is based on the disciplined attorney's conduct. See, e.g., Astles' Case, 134 N.H. 602, 607, 594 A.2d 167, 170-71 (1991) ("the respondent's misconduct warrants the assessment of costs incurred by the Committee in pursuing this matter"). This is strong evidence that the cost assessments are being imposed as part of a sanction. Cf. Kelly, 479 U.S. at 52, 107 S.Ct. 353 ("[T]he decision to impose restitution generally does not turn on the victim's injury, but on the penal goals of the State and the situation of the defendant."); see also In re Bertsche, 261 B.R. 436, 438 (Bankr.S.D.Ohio 2000).
The discretionary nature of the cost assessments also distinguishes this case from In re Taggart, 249 F.3d 987 (9th Cir.2001), on which Richmond relies. In that case, costs were assessed pursuant to a provision that required cost awards in all cases in which an attorney had been disciplined. Id. at 991-92. The Ninth Circuit distinguished this provision from a separate provision that made the cost assessments discretionary, and it found that costs assessed automatically under the first provision were dischargeable. Id. In re Taggart, then, is inapposite here.
We also believe that it is irrelevant that the New Hampshire Supreme Court has, in other contexts, stated that attorney disciplinary proceedings are not, strictly speaking, punitive in nature. The New Hampshire Supreme Court's reluctance to characterize attorney disciplinary proceedings as "punitive" or "criminal" is easily explained. If it were to characterize these proceedings as criminal, enhanced due process protections and notice requirements would likely apply, a result that the New Hampshire Supreme Court might wish to avoid. See In re Burling, 139 N.H. at 268-69, 651 A.2d 940. Thus, it has characterized *919 attorney disciplinary proceedings as neither civil nor criminal in nature: they are "special" proceedings. Id. In a similar vein, other courts have characterized attorney disciplinary proceedings as "quasi-criminal" in nature. See In re Ruffalo, 390 U.S. 544, 551, 88 S.Ct. 1222, 20 L.Ed.2d 117 (1968); In re Carlson, 202 B.R. 946, 951 (Bankr.N.D.Ill.1996) ("[A]n attorney disciplinary hearing is akin to a quasi-criminal proceeding and costs awarded are more akin to a fine than to compensation for losses."). This does not entail that the sanctions handed down in such proceedings are not "penalties" within the meaning of § 523(a)(7). Sanctions are, by their very nature, penalties.[1]Cf. In re Ruffalo, 390 U.S. at 550, 88 S.Ct. 1222.
We have considered Richmond's other arguments and found them to be without merit.[2] We believe that the cost assessments imposed by the New Hampshire Supreme Court in attorney disciplinary proceedings are not similar to costs awarded to prevailing parties in civil litigation. While the latter are essentially routine, the former are quite discretionary and are intended to sanction attorney misconduct. Thus, they are "fines" or "penalties" within the meaning of § 523(a)(7).

B. NOT COMPENSATION FOR ACTUAL PECUNIARY LOSS
Richmond next argues that the cost assessments are "compensation for actual pecuniary loss" and thus dischargeable under § 523(a)(7). Richmond notes that the New Hampshire Supreme Court ordered him to "reimburse" the Committee for the "costs" of the disciplinary action. Reimbursement, Richmond argues, is compensation for actual loss. We do not deny that, viewed in isolation, Richmond's reading of the statute has superficial appeal. In Kelly, however, the Supreme Court cautioned us to read § 523(a)(7) in light of the broader objects of the statute. Kelly, 479 U.S. at 50, 107 S.Ct. 353. While a cost award might "resemble" compensation for an actual loss, "the context in which it is imposed [might] undermine[ ] that conclusion." Id. at 52, 107 S.Ct. 353. Thus, we look to the context in which the penalty is imposed to determine whether its purpose is truly compensatory. Since Kelly is central to the resolution of this issue, we examine it in greater depth. In Kelly, a debtor attempted to have discharged a restitution order entered as a condition of probation in a state criminal proceeding. The Court held, however, that such debts were non-dischargeable under § 523(a)(7) because they were not "compensation for actual pecuniary loss." Id. at 40, 107 S.Ct. 353. The Kelly Court noted that the criminal justice system is "not operated primarily for the benefit of victims, but for the benefit of society as a whole." Id. at 52, 107 S.Ct. 353. While the Court acknowledged that restitution orders necessarily involved compensation for pecuniary loss, this was not dispositive. Instead, the Court emphasized that the primary purpose of restitution orders was to further the "rehabilitative and deterrent goals" of the criminal justice system. Id. at 49, 107 S.Ct. 353. If federal bankruptcy *920 judges were to order discharge of these obligations, the mix of sanctions chosen by the State to further these important goals would be thrown out of balance. Id. This could not be what Congress intended in enacting § 523(a)(7).
Following Kelly, a number of courts of appeals have held that cost assessments levied in criminal proceedings are non-dischargeable under § 523(a)(7). See In re Thompson, 16 F.3d 576, 580-81 (4th Cir.1994); In re Hollis, 810 F.2d 106, 108-09 (6th Cir.1987); In re Zarzynski, 771 F.2d 304, 305-06 (7th Cir.1985). Further, nearly every bankruptcy court to have addressed the proper treatment of cost assessments levied in attorney disciplinary proceedings has found them to be non-dischargeable. See In re Smith, 317 B.R. 302, 313 (Bankr.D.Md.2004); In re Bertsche, 261 B.R. at 438-39; In re Carlson, 202 B.R. at 951; In re Doerr, 185 B.R. 533, 537 (Bankr.W.D.Mich.1995); In re Cillo, 159 B.R. 340, 343 (Bankr.M.D.Fla. 1993); In re Williams, 158 B.R. 488, 491 (Bankr.D.Idaho 1993); In re Lewis, 151 B.R. 200, 203 (Bankr.C.D.Ill.1992); In re Betts, 149 B.R. 891, 896 (Bankr.N.D.Ill. 1993); In re Haberman, 137 B.R. 292, 295-96 (Bankr.E.D.Wis.1992). While noting that attorney disciplinary proceedings are not criminal, these cases have found that the goals of these sanctions  deterrence, rehabilitation and protection of the public interest  are sufficiently analogous to Kelly to support an extension of its rule.
Richmond acknowledges that his position is contrary to the decided weight of authority. Nevertheless, he urges us to take a fresh look at the issue. He argues that Kelly departed from the plain language of § 523(a)(7) only because a common-law exception for criminal restitution awards had long existed. Congress, Richmond asserts, legislated against this common-law background. Further, Richmond argues that extending Kelly to preclude discharge of civil penalties would render most of § 523(a)(7) mere surplusage, because agencies generally assess costs against defendants in successful enforcement actions.
Whatever the merits of Richmond's arguments regarding the extension of Kelly into the civil sphere, they are water under the bridge. We have already held that a civil penalty may qualify as non-dischargeable if "the particular penalty ... serve[s] some `punitive' or `rehabilitative' governmental aim, rather than a purely compensatory purpose." Whitehouse, 277 F.3d at 573 (citing Kelly, 479 U.S. at 52, 107 S.Ct. 353); accord Cost Control, 64 F.3d at 928 (holding that a disgorgement remedy awarded in a suit brought by the U.S. Department of Housing and Urban Development under the Interstate Land Sales Full Disclosure Act was non-dischargeable). While, as we have noted, attorney disciplinary proceedings in New Hampshire are not civil proceedings, our holding in Whitehouse in and of itself is dispositive.
It is clear that the costs assessed in New Hampshire disciplinary proceedings are not "purely compensatory." As we have explained, cost assessments serve both to deter attorney misconduct and to help rehabilitate wayward attorneys. See, e.g., Kersey's Case, 150 N.H. 585, 842 A.2d at 122-23; Morgan's Case, 143 N.H. 475, 727 A.2d at 987; Doherty's Case, 142 N.H. 446, 703 A.2d 261, 264 (1997). Rehabilitation and deterrence are the same public functions that were at issue in Kelly. Thus, under Whitehouse, the cost assessments here are non-dischargeable. See Whitehouse, 277 F.3d at 573 (citing Kelly, 479 U.S. at 52, 107 S.Ct. 353).
It is irrelevant that the cost assessment may be calculated by reference to the actual loss. In fact, there was no question that, in Kelly, the restitution award was calculated in reference to the victim's loss. See Kelly, 479 U.S. at 52, *921 107 S.Ct. 353 ("restitution is forwarded to the victim, and may be calculated by reference to the amount of harm the offender has caused"). This did not determine the outcome, however, because it was the purpose of the penalty that was in issue. Courts have consistently held that the "mere fact that a penal sanction is calculated by reference to actual costs does not, in and of itself, transform the penalty into compensation for pecuniary loss." In re Smith, 317 B.R. at 312. Here, the Committee is not concerned with recouping its litigation costs to the degree that it is concerned with deterring unprofessional conduct.[3]
We emphasize that we are concerned here with the "special" case of New Hampshire attorney disciplinary proceedings, the substantial purpose of which is to deter attorney misconduct, protect the public and to rehabilitate the attorney. "It would be a poor policy indeed to suggest that an attorney could elude punishment for professional improprieties by resorting to the Bankruptcy Code." In re Williams, 158 B.R. at 491. The cost assessments levied in Richmond I and Richmond II are thus non-dischargeable under § 523(a)(7).

IV.
For the foregoing reasons, the decision of the district court is AFFIRMED.
NOTES
[*]  Of the Seventh Circuit, sitting by designation.
[1]  While Richmond points to the dictionary definitions of "fine" and "penalty" in an attempt to show that they are not "punitive," he neglects to note that "sanction," the very term used in the New Hampshire Rules, is defined as a type of "penalty." See BLACK'S LAW DICTIONARY 1341 (7th ed.1999).
[2]  For example, Richmond argues that cost assessments cannot be viewed as "sanctions" because they do not appear in the list of sanctions found in Rule 37A(1)(e)(1). We are not persuaded by this argument, particular when the New Hampshire Supreme Court has clearly indicated that it regards them as sanctions.
[3]  It is also arguable that the Committee suffers a pecuniary loss in the traditional sense. Because the Committee is "not dependent upon the payment of monetary sanctions to fulfill its obligations," the district court noted, it is arguable that it did not suffer a "loss." See In re Smith, 317 B.R. at 312-13; In re Carlson, 202 B.R. at 950; In re Doerr, 185 B.R. at 536; In re Lewis, 151 B.R. at 203; In re Betts, 149 B.R. at 896; In re Haberman, 137 B.R. at 295-96. Similarly, there is some question whether a public agency can be said to "lose" money when it is performing its functions as it should: the funds expended may be characterized as an "expenditure" or "cost" rather than a "loss." In re Zarzynski, 771 F.2d at 306. We perceive little gain in pursuing these technical distinctions and prefer to emphasize the important public purpose served by the cost assessments, even if they are also compensatory. Id. at 306 (Cudahy, J., concurring).
