
578 N.W.2d 675 (1998)
Steven C. CHRISTENSEN, Plaintiff,
v.
IOWA DISTRICT COURT FOR POLK COUNTY, Defendant.
No. 97-983
Supreme Court of Iowa.
May 28, 1998
*677 William A. Price, Des Moines, for plaintiff.
Martha Fagg, Des Moines, for defendant.
Considered by McGIVERIN, C.J., and LARSON, LAVORATO, ANDREASEN, and TERNUS, JJ.
TERNUS, Justice.
Sue Christensen, former wife of the plaintiff Steven Christensen, filed an application for contempt, alleging Steven had willfully failed to comply with the child-support provisions of their dissolution decree. The trial court found Steven in contempt and sentenced him to thirty days in jail with all but one-half hour suspended. The court ordered Steven to serve the remaining one-half hour in the courtroom. Steven filed a petition for writ of certiorari, claiming (1) there was not substantial evidence to support a finding of contempt, and (2) the court lacked authority to order him to serve his sentence in the courtroom. Sue argues Steven's challenge to the courtroom incarceration is moot, as he has already served that portion of his sentence.
We find substantial evidence to support the trial court's contempt finding. Although we conclude any ruling on the sentencing issue will have no practical effect in this case, we address this issue, nonetheless, because it falls within an exception to the mootness doctrine. Addressing the merits of the sentencing issue, we hold the court was without authority to imprison Steven in the courtroom. Notwithstanding this conclusion, we can grant no relief to Steven as he has already served the illegal sentence. Consequently, we annul the writ in part and sustain the writ in part, but do not remand for resentencing.

I. Background Facts and Proceedings.

The marriage of Steven and Sue was dissolved in 1980. Under the terms of the dissolution decree, Steven was ordered to pay child support for the Christensen's three children. In 1994, the decree was modified; under the modified decree, Steven was to pay child support, maintain medical insurance for the children, and pay one-half of the children's uninsured medical expenses.
In 1997, Sue filed an application for contempt, alleging Steven had failed to pay child support for over a year, had refused to maintain medical insurance for the children, and had not paid his half of their uninsured medical expenses. At the hearing on Sue's application, Sue claimed Steven has refused to file tax returns for the years 1994 through 1996 because he knew the refunds would be applied to his support obligation. She asserted Steven has also willfully failed to obtain employment since he lost his job with the Iowa Department of Revenue for failure to file his tax returns. Finally, she claimed that although she has attempted to attach Steven's $20,000 retirement account, Steven has not taken any action to make it available to pay his child support obligation.
Steven admitted that he had not fulfilled his financial obligations under the modified decree since February 1996, when he was terminated from his job. He claimed he had not filed his tax returns because he was still reconstructing his records, which were destroyed when heavy rains in 1993 caused his basement wall to collapse. He acknowledged current, part-time employment by the Iowa National Guard, but pointed out he earned only $494 per month. Steven claimed he could not find a better-paying job because of physical restrictions imposed by his doctor to relieve pain from a strangulated hernia and slipped disk. According to Steven, these physical restrictions precluded him from blue-collar jobs and his employment record with the State of Iowa obstructed his attempts to find a white-collar job. Finally, Steven complained about financial pressures stemming from two civil judgments against him and child support obligations to his children from another marriage.
*678 The district court found beyond a reasonable doubt that Steven had willfully failed to fulfill his child support obligations, and had willfully failed to file income tax returns. The court sentenced Steven to thirty days in the county jail, with all but one-half hour suspended. That one-half hour was ordered to be served in the courtroom at the conclusion of the hearing. Pursuant to this sentence, the deputy handcuffed Steven and placed him in a chair at the back of the courtroom. He was released after one-half hour. The court withheld mittimus on the remaining twenty-nine days and twenty-three and one-half hours term on the condition that Steven reduce the amount of his accrued child support obligation by seventy-five percent by June 1, 1997.
Steven filed a petition for writ of certiorari. He claims there is insufficient evidence to support the contempt finding, and asks that this finding be reversed. In the alternative, Steven argues the one-half hour of imprisonment in the courtroom was illegal under Iowa Code section 598.23(1) (1997), which authorizes imprisonment in the "county jail." He requests the case be remanded for resentencing.

II. Scope of Review.

Our review is at law. See Amro v. Iowa Dist. Ct., 429 N.W.2d 135, 140 (Iowa 1988). In a certiorari action, we may examine only the jurisdiction of the district court and the legality of its actions. See French v. Iowa Dist. Ct., 546 N.W.2d 911, 913 (Iowa 1996); Iowa R. Civ. P. 306. Illegality exists when the court's factual findings lack substantial evidentiary support, or when the court has not properly applied the law. See Amro, 429 N.W.2d at 138.

III. Is There Substantial Evidence to Support the District Court's Finding of Contempt?

On review of a contempt ruling, this court must determine whether substantial evidence exists that would "convince a rational trier of fact that the alleged contemner is guilty of contempt beyond a reasonable doubt." Ervin v. Iowa Dist. Ct., 495 N.W.2d 742, 744-45 (Iowa 1993). The party requesting the contempt finding has the burden of proving that the contemner (1) had a duty to obey a court order, and (2) willfully failed to perform that duty. See In re Marriage of Jacobo, 526 N.W.2d 859, 866 (Iowa 1995). Once a violation of a court order has been shown, the burden shifts to the alleged contemner to produce evidence suggesting that the violation was not willful. See id; Ervin, 495 N.W.2d at 745. Nevertheless, the contemnee retains the burden to prove willfulness beyond a reasonable doubt. See Jacobo, 526 N.W.2d at 866.
Willful disobedience supporting a contempt finding
"requires evidence of conduct that is intentional and deliberate with a bad or evil purpose, or wanton and in disregard of the rights of others, or contrary to a known duty, or unauthorized, coupled with an unconcern whether the contemner had the right or not."
Amro, 429 N.W.2d at 140 (quoting Lutz v. Darbyshire, 297 N.W.2d 349, 353 (Iowa 1980)). There are two ways in which the contemner may show that a failure to comply with a court order was not willful: (1) the order was indefinite; or (2) the contemner was unable to perform the act ordered. See McKinley v. Iowa Dist. Ct., 542 N.W.2d 822, 824 (Iowa 1996).
Here, Steven has admitted his noncompliance with the court's modified dissolution decree; therefore, Sue has established her prima facie case. Because Steven does not claim that the court's order concerning child support was indefinite, the only issue in this case is whether Steven was unable to pay the court-ordered support. Although he presented evidence of financial hardship, we find substantial evidence to support the trial court's finding that Steven willfully failed to make child-support payments, maintain health insurance on his children, and pay one-half their uninsured medical expenses.
The primary piece of evidence supporting the trial court's finding of contempt is the uncontroverted existence of a retirement account Steven could have accessed to meet his obligations. As we observed years ago, the test for determining an ability to pay "`is not merely whether [the contemner] is presently working or has current funds or cash on hand, but whether he has any property *679 out of which payment can be made.'" Callenius v. Blair, 309 N.W.2d 415, 419 (Iowa 1981) (quoting Harkins v. Harkins, 256 Iowa 207, 211, 127 N.W.2d 87, 90 (1964)), overruled by Phillips v. Iowa Dist. Ct., 380 N.W.2d 706, 709 (Iowa 1986) (overruling in part on the issue of the proper burden of proof applied in contempt actions). Even on appeal, Steven offers no excuse for his failure to tap his retirement account to pay his court-ordered obligations.
In a similar case, we held that a parent's failure to apply retirement account funds to the parent's decretal obligation was a critical factor in finding the parent had the ability to comply with the court's order. McKinley, 542 N.W.2d at 824-25. As we noted in that case, a parent is "not free to prioritize [the parent's] financial obligations so as to prefer [the parent's] own creditors over [the parent's] court-ordered obligation." Id. at 825.
Like the contemner in McKinley, Steven had property out of which he could have paid his child supporthis retirement account. We consider this account available for his support obligations even though his withdrawal of these monies would have meant the loss of his employee status with the State's retirement fund. Again, Steven's personal finances cannot take priority over his obligations to his children.
We also note that the trial court found Steven's excuses for failing to find more lucrative employment and for failing to file his income tax returns unconvincing. The district court plainly believed Steven had purposely chosen not to seek suitable employment and not to file his tax returns. We give "great deference to the trial court on issues of witness credibility." Id. Moreover, other evidence supports the trial court's disregard of Steven's explanations. Steven had a college education and three years in which to reconstruct his tax records. The trial court was warranted in believing Steven could have found a better paying job and could have filed his tax returns before foregoing his child-support obligation for more than a year. We conclude the evidence of willfulness was substantial and supports the district court's finding of contempt.

IV. Does the Mootness Doctrine Prevent Our Review of the Sentencing Issue?

This court will generally dismiss an appeal "`when judgment, if rendered, will have no practical legal effect upon the existing controversy.'" Roth v. Reagen, 422 N.W.2d 464, 466 (Iowa 1988) (quoting Toomer v. Iowa Dep't of Job Serv., 340 N.W.2d 594, 598 (Iowa 1983)). Excluded from this category, however, are cases "where matters of public importance are presented and the problem is likely to recur." Iowa Freedom of Info. Council v. Wifvat, 328 N.W.2d 920, 922 (Iowa 1983). In such a situation, this court has discretion to consider the appeal on its merits. See Berleen v. Iowa Dep't of Pub. Safety, 260 Iowa 699, 701, 150 N.W.2d 593, 594 (1967). In deciding whether to accept a moot case, it is also appropriate to consider whether the challenged action "is such that often the matter will be moot before it can reach an appellate court." Danner v. Hass, 257 Iowa 654, 660, 134 N.W.2d 534, 539 (1965), overruled by Needles v. Kelley, 261 Iowa 815, 822, 156 N.W.2d 276, 280 (1968) (overruling in part on the issue of the proper scope of review for suspension of driver's licenses).
Any judgment in this case that Steven's incarceration in the courtroom was illegal will have no practical effect on Steven inasmuch as he has already served that portion of his sentence. Nevertheless, a onehalf hour sentence is clearly one that could not be appealed prior to its being served. Additionally, we think the district court's sentencing authority for contempt is a matter of public interest. Therefore, we exercise our discretion and proceed to address the merits of the sentencing issue.

V. Was the District Court's Sentence of One-Half Hour to be Served in the Courtroom Illegal?

An Iowa court's contempt power is inherent, but the power to punish may be validly limited by statute. See Wilson v. Fenton, 312 N.W.2d 524, 528 (Iowa 1981). A statute regulating the court's contempt power constructively repeals all common law on the subject. See id. Thus, where a statute prescribes the punishment for contempt, the *680 court may sentence a contemner only as provided in the governing statute. See, e.g., French, 546 N.W.2d at 915 (finding that a monetary judgment was not authorized under chapter 665, and was therefore illegal); McKinley, 542 N.W.2d at 826 (looking to statutes to find discretion to sentence contemner to "hard labor"); Shedlock v. Iowa Dist. Ct., 534 N.W.2d 656, 660 (Iowa 1995) (holding that imprisonment for fifty days was authorized by statute); Wilson, 312 N.W.2d at 529 ("Because no other sanctions are provided, no other sanctions are authorized.").
The Iowa legislature has enacted statutes governing punishment for contempt. Iowa Code section 665.4(2) allows the district court to impose a fine and/or "imprisonment in a county jail not exceeding six months." (Emphasis added.) Section 665.5 provides for an indeterminate term of incarceration where imprisonment is used to coerce compliance with a court order. These statutes are available to punish violations of a dissolution decree, with the caveat that Iowa's dissolution statute, chapter 598, reduces the maximum duration of any term of punitive incarceration to only thirty days. See Iowa Code § 598.23(1) (authorizing the district court to punish a person who willfully disobeys an order or decree by committing the person "to the county jail for a period of time not to exceed thirty days for each offense") (emphasis added); Ickowitz v. Iowa Dist. Ct., 452 N.W.2d 446, 449-50 (Iowa 1990). "[A] court which has found that imprisonment is a proper sanction for past acts of contempt may withhold commitment conditioned on... compliance with prescribed conditions." Ickowitz, 452 N.W.2d at 450; see also Iowa Code § 907.3(3) (allowing suspended sentences).
Focusing now on the sentence imposed in this case, we think the district court was clearly empowered by section 598.23(1) to sentence Steven to thirty days in the Polk County jail. Furthermore, the court had authority to suspend all or part of this sentence. The fighting issue is whether the district court had authority to order Steven's confinement on that portion of the sentence not suspended somewhere other than in the county jail.
Sue argues on behalf of the district court that the court's sentence was legal because the court had authority to suspend Steven's sentence conditioned on his compliance with specified conditions. See Ickowitz, 452 N.W.2d at 450. She claims Steven's confinement in the courtroom was such a condition. The problem with this argument is that Steven's confinement in the courtroom was not a condition of his suspended sentence. Rather, his courtroom incarceration was that portion of the original jail sentence that Steven was ordered to serve regardless of whether he satisfied his child-support obligations. See Amro, 429 N.W.2d at 139 (holding incarceration is punitive, not coercive, where contemner can take no action that will effect his release). Only the remaining sentence of twenty-nine days and twenty-three and one-half hours in the county jail was conditional. Although we sympathize with the court's desire to punish Steven by making him serve some portion of his sentence and at the same time avoid the time-consuming and complicated process of having Steven admitted to the county jail for only a half hour of imprisonment, we conclude the court had no power to allow Steven to serve his jail time in the courtroom. Therefore, although the court was exercising a judicial function, it imposed an illegal sentence.
As we have already noted, it would be futile to remand this case because the district court cannot correct that portion of the sentence we have found illegal; Steven has already served that part of his sentence. Therefore, although we sustain the writ with respect to the one-half hour sentence ordered served in the courtroom, we do not remand for resentencing.
WRIT SUSTAINED IN PART, AND ANNULLED IN PART.
