
538 N.W.2d 291 (1995)
Kevin D. HEWITT, Plaintiff,
v.
IOWA DISTRICT COURT FOR WAPELLO COUNTY, Defendant.
No. 94-674.
Supreme Court of Iowa.
September 20, 1995.
Rehearing Denied October 25, 1995.
Steven Gardner of Kiple, Kiple, Denefe, Beaver & Gardner, Ottumwa, for plaintiff.
Thomas J. Miller, Attorney General, Mary Tabor, Assistant Attorney General, William H. Appel, County Attorney, and Laura M. Roan, Assistant County Attorney, for defendant.
Considered by HARRIS, P.J., and LARSON, SNELL, ANDREASEN, and TERNUS, JJ.
TERNUS, Justice.
Plaintiff in certiorari, Kevin D. Hewitt, was convicted and sentenced for serious domestic abuse assault. See Iowa Code §§ 708.1, 708.2A(2)(b) (1993). On appeal, Hewitt claimed that the district court acted illegally in modifying its oral sentence announced at the sentencing hearing. His case was transferred to the court of appeals where his sentence was modified. We granted the State's petition for further review.
Initially, we note that although Hewitt filed a notice of appeal, he should have sought review by filing a petition for writ of certiorari. Backstrom v. Iowa Dist. Ct., 508 N.W.2d 705, 707 (Iowa 1993), cert. denied, ___ U.S. ___, 114 S.Ct. 1566, 128 L.Ed.2d 211 (1994) (where a party claims that the court has exceeded its jurisdiction or otherwise acted illegally, review is obtained by writ of certiorari, not by appeal); Zimmermann v. Iowa Dist. Ct., 480 N.W.2d 70, 74 (Iowa 1992) (certiorari tests the legality of an action taken by the district court). Nevertheless, we proceed as though the proper form of review had been sought. Iowa R.App.P. 304; Hearity v. Iowa Dist. Ct., 440 N.W.2d 860, 862 (Iowa 1989). Because we conclude the district court had the authority to modify its oral sentence, we vacate the *292 decision of the court of appeals and annul the writ.
I. Background Facts and Proceedings. Hewitt pleaded guilty to a charge of serious domestic abuse assault. The trial court sentenced him to thirty days in jail with all but three days suspended and credit for one day served. The court also ordered Hewitt to pay a $250 fine plus a thirty percent surcharge, court costs and attorney fees. Hewitt was placed on probation "to the court" for two years and directed to complete the batterer's education program.
After pronouncing sentence, the trial court conferred with the county attorney and Hewitt's counsel. They discussed Hewitt's request to rescind a prior no-contact order. During this discussion, someone suggested placing Hewitt on probation to the department of corrections. Neither counsel objected; however, Hewitt had left and was not present during this conference.
Two days later the court entered a written judgment entry setting forth a sentence identical to the prior oral sentence with one exception: Hewitt was to be supervised by the department of corrections for the eighth judicial district. Hewitt objected to having his probation supervised by the department. On its own motion, the court scheduled a hearing to reconsider its oral sentence. After a hearing at which Hewitt was present, the court reconsidered its oral sentence and modified that sentence by making Hewitt's probation subject to the supervision of the department.
Hewitt appealed, arguing that the court erred in filing a judgment entry that differed from its oral sentence. The court of appeals modified the trial court's sentence by striking the provision that the department supervise Hewitt's probation. We granted further review. Our review of this certiorari action is for errors of law. Iowa Dep't of Transp. v. Iowa Dist. Ct., 534 N.W.2d 457, 459 (Iowa 1995).
II. District Court's Authority. The parties raise several issues, including whether the oral sentence or the written sentence is the official judgment of the court and whether the court has the authority sua sponte to modify an oral sentence in its written judgment. We find it unnecessary to address these issues because we agree with the State's contention that the court had the power under Iowa Code section 903.2 to reconsider its sentence at the hearing scheduled by the court for this purpose. Therefore, error, if any, by the trial court in issuing a written judgment entry different from its oral pronouncement was cured by the court's later reconsideration of the oral sentence pursuant to section 903.2.
Iowa Code section 903.2 allows the district court to reconsider a misdemeanant's sentence under the following circumstances:
For a period of thirty days from the date when a person convicted of a misdemeanor begins to serve a sentence of confinement, the court may order the person to be returned to the court, at which time the court may review its previous action and reaffirm it or substitute for it any sentence permitted by law.
A similar statute allows the court to reconsider the sentence of a convicted felon within a ninety-day period. Iowa Code § 902.4 (1993). We interpret these statutes similarly. State v. Iowa Dist. Ct. for Lee County, 392 N.W.2d 143, 145 (Iowa 1986). Therefore, in deciding this case, we look to precedent that applied either section 902.4 or section 903.2.
Section 903.2 allows the court to reconsider a defendant's sentence anytime within the thirty-day period. Id. at 144. It is only necessary that the court's order indicating its intention to reconsider the sentence be filed within thirty days of the commencement of the defendant's sentence; the actual hearing and reconsideration may occur later. Cf. State v. Iowa Dist. Ct. for Polk County, 492 N.W.2d 666, 668 (Iowa 1992) (interpreting section 902.4); State v. Sullivan, 326 N.W.2d 361, 364 (Iowa 1982) (same). Once the defendant is before the court, the court may, if it chooses, impose a more onerous sentence. Cf. Coleman v. Iowa Dist. Ct., 446 N.W.2d 806, 807 (Iowa 1989) (applying section 902.4).
Here the court, on its own motion, scheduled a hearing to reconsider Hewitt's *293 sentence. This order was filed on the same day that Hewitt began to serve his sentence and therefore, was timely under section 903.2. Hewitt was personally present in court when the court reviewed his sentence, as required by the statute. Because the court complied with section 903.2, it acted within its authority in modifying its sentence and placing Hewitt under the supervision of the eighth judicial district department of corrections. We find no merit in Hewitt's objection to the court's action.
DECISION OF COURT OF APPEALS VACATED; WRIT ANNULLED.
