
617 N.W.2d 421 (2000)
Jesse Lee BROWN and Ronald J. Bergeron on behalf of themselves and all others similarly situated, et al., Appellants,
v.
The STATE of Minnesota, Respondent.
No. C6-00-587.
Court of Appeals of Minnesota.
September 19, 2000.
Review Denied November 21, 2000.[*]
*423 John A. Cochrane, Cochrane & Bresnahan, St. Paul, MN; and Hugh V. Plunkett, III, Robert K. Shelquist, Plunkett, Schwartz, Peterson, P.A., Minneapolis, MN; and Ronald I. Meshbesher, Anthony J. Nemo, Meshbesher & Spence, Ltd., Minneapolis, MN (for appellants).
Mike Hatch, Attorney General, Patricia A. Sonnenberg, Assistant Attorney General, St. Paul, MN; and Michael V. Ciresi, Roberta B. Walburn, Gary L. Wilson, Robins, Kaplan, Miller & Ciresi, L.L.P., Minneapolis, MN (for respondent).
Considered and decided by RANDALL, Presiding Judge, HARTEN, Judge, and HALBROOKS, Judge.

OPINION
HALBROOKS, Judge
Appellants challenge the district court's granting of respondent's motion to dismiss their declaratory judgment class action for failure to state a claim. They also challenge the district court's imposition of sanctions in this case. Because the district court did not err in dismissing the action but did abuse its discretion in imposing sanctions, we affirm the dismissal and reverse the imposition of sanctions.

FACTS
This litigation arises in the aftermath of the State of Minnesota's ("state") multi-billion-dollar settlement of its claims against multiple entities involved in the manufacturing and marketing of cigarettes ("tobacco defendants"). The state asserted several causes of action against the tobacco defendants including various antitrust and consumer fraud claims. The state and the tobacco defendants settled the case on May 18, 1998, after all of the evidence had been introduced at trial but before the case went to the jury. As a result of the settlement, the tobacco defendants agreed to pay the state approximately $6.17 billion. The tobacco defendants agreed to pay $1.31 billion in periodic payments between September 1998 and January 2003, as well as an estimated $4.8 billion in future payments.
On July 17, 1998, appellants filed a class-action lawsuit in Hennepin County District Court seeking a declaratory judgment and a portion of the settlement proceeds. The putative class representatives represent approximately 70,000 Minnesota residents who allege to have suffered smoking-related illnesses for which the state paid medical expenses under the state's medical-assistance and general-assistance programs. Appellants contend that, although they did not pay for the medical expenses they incurred, the medical-assistance and general-assistance statutes provide that any third-party liability claim is "shared" or jointly owned by appellants and the state. Both parties agree that the settlement precludes individual medical-assistance and general-assistance recipients from asserting claims against the tobacco defendants for state-paid medical expenses. Appellants contend, however, that they are entitled to a share of the settlement proceeds obtained by the state. This claim is based on the fact that the medical-assistance and general-assistance statutes contain formulae to be used to allocate recoveries from third parties between the state and individual recipients for claims brought pursuant to those statutes.
The state filed a motion to dismiss appellants' complaint for failure to state a claim upon which relief could be granted and a motion for sanctions. Appellants opposed these motions and filed a motion for partial summary judgment. The district court heard arguments on all of the motions and filed an order granting the state's motion to dismiss appellants' complaint, granting the state's motion for sanctions, and denying appellants' motion *424 for partial summary judgment. But the district court requested that the parties provide additional submissions on the issue of sanctions and held a second hearing on that issue. On August 17, 1999, the district court reaffirmed its decision to impose sanctions and ordered each of the three law firms involved in the litigation to pay $5,000 to the state. This appeal follows.

ISSUES
1. Does appellants' complaint set forth a legally sufficient claim for relief?
2. Did the district court abuse its discretion when it imposed sanctions against appellants' attorneys?

ANALYSIS

1. Motion to dismiss
When reviewing a dismissal for failure to state a claim on which relief can be granted, an appellate court must only determine whether the complaint sets forth a legally sufficient claim for relief. Geldert v. American Nat'l Bank, 506 N.W.2d 22, 25 (Minn.App.1993), review denied (Minn. Nov. 16, 1993). It is immaterial whether the plaintiff can prove the facts alleged in the complaint. Juster Steel v. Carlson Cos., 366 N.W.2d 616, 619 (Minn.App.1985). A complaint should only be dismissed for failure to state a claim if it appears to a certainty that no facts consistent with the pleading exist that support granting the relief demanded. Brakke v. Hilgers, 374 N.W.2d 553, 555 (Minn.App.1985). Although the district court typically may not consider documents other than the complaint without converting the motion into one for summary judgment, an exception to this rule exists if the complaint refers to a document and the document is central to the claims alleged. In re Hennepin County 1986 Recycling Bond Litig., 540 N.W.2d 494, 497 (Minn.1995).
In this case, the district court did rely on one or more documents that were filed in connection with the tobacco litigation. The documents, prepared by respondent in the tobacco litigation, were referenced in appellants' complaint. The district court appropriately relied on the documents in addition to the complaint and appellants do not challenge the court's consideration of these documents.

A. Express declaration of rights
Appellants contend that the district court's decision to analyze this case through the lens of a motion to dismiss created a procedural defect requiring reversal. Appellants' complaint seeks a declaratory judgment pursuant to Minnesota's version of the Uniform Declaratory Judgments Act. Minn.Stat. §§ 555.01-.16 (1998). Appellants contend that they are entitled to an actual declaration of the respective rights of the putative class members and the state and that any right to actually receive a portion of the settlement proceeds is collateral to the declaratory judgment. See Minn.Stat. § 555.01 (providing that the court's declaration may be either affirmative or negative in form and effect). The question, therefore, is whether the district court's dismissal of appellants' complaint based on the ultimate relief sought, i.e., a portion of the tobacco settlement, operates as a declaration of their rights.
This alleged procedural defect is similar to one of the issues addressed in Ketterer v. Independent Sch. Dist. No. 1, 248 Minn. 212, 79 N.W.2d 428 (1956). In Ketterer, the appellant argued "that the court abused its discretion in dismissing the action instead of making a declaration in his favor or any declaration at all." Id. at 227, 79 N.W.2d at 439. The supreme court, however, held that:
The judgment dismissed the plaintiff's complaint. Plaintiff argues that the judgment is defective in that it did not declare the rights of the parties. The judgment in better form should have declared the rights of the parties in conformity with findings and conclusions *425 of law. The declaration may be either affirmative or negative in form and effect. However, since the court's findings of fact, conclusions of law, and order for judgment resulting in a dismissal herein operates as an adjudication upon the merits, the failure to declare the rights of the parties on the state of the record in this case is, we think, here without prejudice and not reversible error.
Id. at 228-29, 79 N.W.2d at 440 (citations omitted).
Like Ketterer, the district court in this case did not expressly declare the respective rights of the parties, but its findings, conclusions, and order do operate as an adjudication of the merits. While an express declaration of the parties' rights may have been preferable, the district court effectively declared that the appellants have no right to any portion of the tobacco settlement by operation of the medical-and general-assistance statutes discussed below.

B. Allocation formulae
"[S]ome recovery theory must underlie a declaratory judgment demand." Vrieze v. New Century Homes, Inc., 542 N.W.2d 62, 67 (Minn.App.1996). In this case, appellants' two-count complaint asserts statutory claims under the Minnesota medical-assistance and general-assistance programs as the basis for recovery. See Minn.Stat. §§ 256B.042, subd. 5; 256B.37, subd. 4; 256D.03, subd. 8(f) (1998). Contrary to the appellants' repeated assertions, however, the state did not proceed in the tobacco litigation in a representative capacity or assert claims that were derivative to those of the medical- and general-assistance recipients. Rather, the state brought a direct action against the tobacco defendants for the damages sustained by the state. Those claims did not implicate the medical- and general-assistance statutes. In other words, the state's lawsuit was outside the scope of these statutes. For this reason alone, we could affirm the district court dismissal.
Nonetheless, a fair reading of the settlement agreement does give some weight to the appellants' arguments. The settlement agreement releases the tobacco defendants from liability for state-paid medical expenses, i.e., expenses paid by the medical- and general-assistance programs. Therefore, although the state's complaint in the tobacco litigation did not seek damages pursuant to these statutes, any claim the state may have had for these damages was settled at the conclusion of the litigation. See Minn.Stat. §§ 256B.042, subd. 3 (authorizing the state to take actions to enforce its medical-assistance lien or pursue an independent action against a third party "that may be liable" to the recipient); 256B.37, subd. 2 (authorizing the state to join or institute a civil action to enforce its medical-assistance subrogation rights); 256D.03, subd. 8(d) (authorizing state to institute or join a civil action to enforce its general-assistance subrogation rights). But even if the pleadings in the tobacco litigation and the instant case did not support the district court's dismissal, the medical- and general-assistance statutes do not provide an avenue for the appellants to obtain a portion of the state's settlement.
This court interprets statutes de novo, and we need not defer to the district court's interpretation. Sorenson v. St. Paul Ramsey Med. Ctr., 457 N.W.2d 188, 190 (Minn.1990). The three statutes at issue in this case contain nearly identical language and provide formulae for allocating recoveries obtained from third parties who are liable for medical- and general-assistance expenses paid by the state. Under each of these statutes, attorney fees and costs incurred by the party who obtained the recovery are paid first. Minn. Stat. §§ 256B.042, subd. 5; 256B.37, subd. 4; 256D.03, subd. 8(f). Next, the state is reimbursed to the extent of its expenditures on behalf of the medical- or general-assistance recipient out of the remaining *426 proceeds. Minn.Stat. §§ 256B.042, subd. 5; 256B.37, subd. 4; 256D.03, subd. 8(f). Finally, the recipient is entitled to retain any recovery in excess of the state's expenditures or, at a minimum, one-third of the recovery. Minn.Stat. §§ 256B.042, subd. 5; 256B.37, subd. 4; 256D.03, subd. 8(f).
Both parties agree on several important facts. First, the state's settlement precludes individual medical- and general-assistance recipients from pursuing claims for past or future health care costs covered by the state's medical- or general-assistance programs. Second, the state's settlement does not preclude individual medical- or general-assistance recipients from pursuing claims against the tobacco defendants for other damages, e.g., pain and suffering or lost wages. Finally, had the state not brought its suit and had the putative class members made recoveries from the tobacco defendants on their own, the class members would have been entitled to at least one-third of the recovery after attorney fees and costs were paid.
The central issue in this case is whether any portion of the state's recovery is subject to distribution to individual smokers pursuant to the allocation formulae contained in the medical- and general-assistance statutes. The district court concluded that the statutes do not provide a basis for the putative class to proceed with its claim. We agree.
Minnesota, as mandated by the federal Medicare act, requires all recipients of medical assistance to assign to the state any claim they may have against third parties for the medical expenses paid by the state. 42 U.S.C. § 1396k(a)(1)(A); Minn.Stat. § 256B.056, subd. 6. General-assistance recipients are required to make a similar assignment. Minn.Stat. § 256D.03, subd. 3a. In other words, subsequent to the assignment, the legal right to recover the medical expenses paid by the state from third parties belonged solely to the state.
Appellants contend that as a result of the tobacco settlement the state divested them of a right to pursue the tobacco defendants for past and future medical expense. But they currently have the same rights they had prior to the tobacco settlement. They have a right to bring a claim for damages against the tobacco defendants, but they do not have a right to retain the damages representing the state-paid medical expenses. They relinquished their interest in those expenses when they made the assignment to the state. As a result of the assignment, it is clear that the recovery-allocation statutes do not provide appellants with a basis for obtaining a portion of the state's tobacco settlement.
The three statutes at issue in this case all provide that the state is to be fully reimbursed for the payments it made on behalf of the individual recipients. The medical-assistance statutes provide that "[t]he full amount of medical assistance paid to or on behalf of the person as a result of the injury must be * * * paid to the state" before the individual retains any of the recovery. Minn.Stat. §§ 256B.042, subd. 5; 256B.37, subd. 4. The general-assistance statute contains nearly identical language. Minn.Stat. § 256D.03, subd. 8(f).
Nonetheless, there are instances when the state will not be fully reimbursed. For example, if the net recovery, i.e., the recovery less attorney fees and costs, is less than the payments made by the state, the state will not recoup all of its payments. Also, if reimbursing the state in full would result in the individual recipient receiving less than one-third of the net recovery, the state's reimbursement is limited.
The provision in each of these three statutes allowing a minimum of one-third recovery by the individual recipient who pursues a liable third party serves two purposes. First, it provides that individual recipient with an incentive to pursue a claim. If the individual recipient pursues the liable third party, the state need not expend its limited resources in an effort to *427 recoup its payments. Second, allowing the individual recipient to retain a portion of any recovery made by that individual is recognition that the individual will typically have claims against the third party for more than just medical expenses. For example, the individual will likely have a claim for pain and suffering and possibly one for lost wages or earning capacity. The state is entitled to the first dollar of any recovery regardless of how that recovery is classified by the parties. See State, Dep't of Human Servs. v. Bengston, 506 N.W.2d 38, 39-40 (Minn.App.1993) (providing that state may satisfy its interest out of recipient's settlement regardless of how that settlement is characterized by the recipient), review denied (Minn. Nov. 16, 1993). But the legislature has made a policy decision that the individual recipient should be permitted to retain a portion of any recovery that he or she successfully pursues. In this case, appellants did not pursue the tobacco defendants and have not lost their causes of action for their own alleged injuries.
Based on our interpretation of the recovery-allocation statutes, we agree with the district court's dismissal of appellants' complaint. These statutes do not provide a basis for appellants to obtain a portion of the state's tobacco settlement. Although the district court should have provided the parties with an express declaration of their rights, its findings, conclusions and order have this effect. The recovery-allocation statutes relied on by appellants do not confer on them any rights that would allow them to obtain a portion of the state's tobacco settlement. Appellants' complaint does not set forth a legally sufficient claim for relief and it was not error for the district court to order the dismissal.

2. Sanctions
Appellate courts will not disturb a district court's decision to impose sanctions under Minn. R. Civ. P. 11 unless the district court abused its discretion. Uselman v. Uselman, 464 N.W.2d 130, 145 (Minn.1990). "But courts should construe rule 11 somewhat narrowly to avoid deterring legitimate or arguably legitimate claims." Conant v. Robins, Kaplan, Miller & Ciresi, L.L.P., 603 N.W.2d 143, 150 (Minn.App.1999) (citing Uselman, 464 N.W.2d at 142), review denied (Minn. Mar. 14, 2000).
In this case, the district court imposed $5,000 in sanctions against each of the three law firms representing the putative class. The district court identified as its bases for imposing the sanctions that the premise of appellants' lawsuit was "monumentally" wrong and there was not a "shred of evidence to support bringing it." It also indicated at the hearing that it hoped to deter additional attempts by others to obtain a portion of the settlement. Contrary to the district court's position, we do not conclude that appellants' lawsuit was completely frivolous. The recovery-allocation statutes are not absolutely clear and there are no Minnesota cases establishing that these statutes bar medical- and general-assistance recipients from pursuing a portion of the state's recovery.[1]
Appellants' lawsuit did not lack all objective reasonableness. Although the district court correctly determined that appellants did not state a claim upon which relief could be granted, we conclude that appellants' novel claims were brought in good faith. See Minn. R. Civ. P. 11 (providing that parties are permitted to submit pleadings that contain good faith arguments for the extension or modification of existing law). The state would not have *428 incurred the medical- and general-assistance expenses for smoking illnesses without the members of the putative class. Further, the medical- and general-assistance statutes do provide for an allocation between the recipient and the state in at least some situations where a recovery is made from a third party. In light of this, we hold that the district court abused its discretion in sanctioning appellants' attorneys.

DECISION
The state's settlement in the tobacco litigation is not subject to the recovery-allocation formulae contained in Minn.Stat. §§ 256B.042, subd. 5 (1998); 256B.37, subd. 4 (1998); and 256D.03, subd. 8(f) (1998). The district court's dismissal of appellants' class-action lawsuit was appropriate, but the district court's imposition of sanctions against appellants in this case was an abuse of discretion. Appellants did not ultimately prevail on their claim, but it cannot be said that they failed to assert claims that were, at a minimum, arguably legitimate at the time they were made.
Affirmed in part and reversed in part.
NOTES
[*]  PAGE, GILBERT, JJ., took no part in the consideration or decision of this case.
[1]  Subsequent to oral argument on this matter, respondent's counsel provided the court and appellants' counsel with a copy of State of California v. Superior Court, 99 Cal.Rptr.2d 735, 2000 WL 1231390, an August 31, 2000 decision from the California Court of Appeals. While the California court's opinion comments specifically on the Minnesota district court's order in this case and reaches the same result we do, the California court's decision is not dispositive and does not serve as a basis for our decision.
