
446 N.W.2d 791 (1989)
Mark Allen ASCHAN I, Appellee,
v.
STATE of Iowa, Appellant.
No. 88-1316.
Supreme Court of Iowa.
October 18, 1989.
Rehearing Denied November 22, 1989.
Thomas J. Miller, Atty. Gen., and Layne M. Lindebak, Asst. Atty. Gen., for appellant.
Raymond E. Rogers, State Appellate Defender, and James F. Whalen, Asst. State Appellate Defender, for appellee.
Considered by LARSON, P.J., and SCHULTZ, CARTER, LAVORATO, and ANDREASEN, JJ.
LAVORATO, Justice.
Iowa Code section 663A.2(6) (1987) permits prisoners to challenge forfeiture of good conduct time through postconviction proceedings provided they first exhaust the appeal procedure of section 903A.3(2). Section 903A.3(2) provides that orders of the hearing officer are subject to appeal to the superintendent or warden. It also provides that the decisions of the superintendent or warden are subject to review by the director of the Iowa department of corrections.
Because section 663A.2(6) uses the word "appeal," the postconviction applicant, Mark Aschan I, contended prisoners need only appeal to the warden or superintendent and may bypass review by the director. The district court agreed and overruled the State's motion to dismiss, which alleged that the district court lacked jurisdiction. The State based its jurisdictional claim on the applicant's alleged failure to exhaust his administrative remedies. Because we *792 find that the district court should not have taken jurisdiction of the case, we vacate the judgment and remand the case for an order of dismissal.
On August 18, 1987, the Anamosa prison disciplinary committee found Aschan guilty of violating two disciplinary rules. As punishment Aschan received two days in disciplinary detention, two days weekend lockup, and a loss of eighteen days of good conduct time. Aschan appealed the decision to the warden who denied the appeal.
Aschan then filed a substituted petition for postconviction relief in the district court. The district court tried the substituted petition together with two other postconviction relief actions that Aschan had pending.
Following the close of Aschan's evidence, the State moved to dismiss, citing the court's lack of jurisdiction. The State contended that Aschan had failed to exhaust his administrative remedies when he failed to appeal the warden's decision to the director of the Iowa department of corrections. The district court overruled the State's motion. It granted relief on the substituted petition but denied relief as to the other two actions that were pending.
The State appealed only from the decision that was adverse to itthe relief the district court granted on the substituted petition. On appeal the State again contends the district court lacked jurisdiction to hear the substituted petition because Aschan had failed to exhaust his administrative remedies.
Iowa Code section 663A.2(6) provides:
Any person who has been convicted of, or sentenced for, a public offense and who claims that:
. . . .
6. The person's reduction of sentence pursuant to sections 903A.1 through 903A.7 has been unlawfully forfeited and the person has exhausted the appeal procedure of section 903A.3, subsection 2; . . . may institute ... a proceeding [for postconviction] relief.
(Emphasis added.) This provision clearly provides that prisoners must exhaust the appeal procedure in section 903A.3(2) before challenging an administrative forfeiture of good conduct time in district court.
Section 903A.3(2) provides:
The orders of the administrative law judge are subject to appeal to the superintendent or warden of the institution, or the superintendent's or warden's designee, who may either affirm, modify, remand for correction of procedural errors, or reverse an order. However, sanctions shall not be increased on appeal. A decision of the superintendent, warden, or designee is subject to review by the director of the Iowa department of corrections who may either affirm, modify, remand for correction of procedural errors, or reverse the decision. However, sanctions shall not be increased on review.
(Emphasis added.) The two italicized wordsappeal and reviewin this provision are the source of the problem in this case.
Aschan gives the word "appeal" in section 663A.2(6) a narrow meaning. He argues that "appeal" in this section does not include a "review" by the director of the Iowa department of corrections. He concludes, therefore, that once prisoners have appealed to the warden they have the option either to seek such a review or to bypass this step and proceed to district court.
The State, on the other hand, counters by arguing that the legislature did not intend such a narrow meaning of the word "appeal." According to the State, "appeal" and "review" in section 903A.3(2) are synonymous; therefore, prisoners must exhaust both steps of the procedure in this section before filing for postconviction relief in district court. We agree.
Before seeking judicial review of an administrative decision, an aggrieved party must exhaust all administrative remedies. Alberhasky v. City of Iowa City, 433 N.W.2d 693, 695 (Iowa 1988). A failure to do so deprives the court of jurisdiction of the case. See City of Des Moines v. Des Moines Police Bargaining Unit Ass'n, 360 N.W.2d 729, 730 (Iowa 1985). There are several reasons for this rule:

*793 The exhaustion requirement is both an expression of administrative autonomy and a rule of sound judicial administration. The agency is created as a separate entity, vested with its own powers and duties. The agency should be free, even when it errs, to work out its own problems. The courts should not interfere with the job given to it until it has completed its work. Premature interruption of the administrative process is no more justified than premature interruption of the trial process by interlocutory appeals. The agency, as the tribunal of first instance, should be permitted to develop the factual background upon which decisions should be based. Like the trial court, the agency should be given the first chance to exercise discretion and apply its expertness. In addition, judicial efficiency requires the courts to stay their hand while the party may still vindicate his rights in the administrative process. If he is required to pursue further agency remedies, the courts may never have to intervene.
Id. at 732 (citing B. Schwartz, Administrative Law § 172 at 498 (1976). Accord, Comment, Exhaustion of Administrative Remedies in Iowa After LeaseAmerica Corp. v. Iowa Department of Revenue, 69 Iowa L.Rev. 755, 760-61 (1984).
Two conditions must be met before we apply the doctrine. First, an administrative remedy must exist for the claimed wrong. Second, the statute must expressly or impliedly require that remedy to be exhausted before court intervention. Rowen v. LeMars Mut. Ins. Co. of Iowa, 230 N.W.2d 905, 909 (Iowa 1985); accord City of Des Moines at 360 N.W.2d at 731.
Applying this analysis, we think section 903A.3(2) easily meets the first prongthe existence of an administrative remedy. To avoid the application of the doctrine under the first prong, the aggrieved party must show that the relief sought is not within the jurisdiction of the agency. Id. at 909. Here Aschan seeks relief in two respects: (1) restoration of his good conduct time credits and (2) expungement of the disciplinary actions from his record. This form of relief is clearly within the jurisdiction of the director, who has the power to "affirm, modify, remand for correction of procedural errors, or reverse the decision of the superintendent, warden or [warden's] designee." Iowa Code § 903A.3(2) (1987).
We think the second prongthe statute must expressly or impliedly require the remedy to be exhaustedis also satisfied. As to this phase of the analysis we rely on familiar principles of statutory construction. In construing statutes our ultimate goal is to ascertain and give effect to what the legislature intended. Harden v. State, 434 N.W.2d 881, 884 (Iowa), cert. denied, ___ U.S. ___, 110 S.Ct. 194, 107 L.Ed.2d 149 (1989). In doing so we look to what objectives the legislature sought to accomplish and construe the statute so as to best effect, rather than defeat, legislative intent. Iowa Federation of Labor v. Iowa Dep't of Job Serv., 427 N.W.2d 443, 445 (Iowa 1988). When the legislature does not define words in a statute, we normally give them their ordinary and usual meaning. But the manifest intent of the legislature will prevail over the literal import of words used. Welp v. Iowa Dep't of Revenue, 333 N.W.2d 481, 483 (Iowa 1983).
With these principles in mind we turn to the two statutes involvedsection 663A.2(6) and section 903A.3(2)to determine whether the legislature intended prisoners to appeal to the warden and then seek review by the director before proceeding to district court. While Aschan's argument has some merit, we are not persuaded. Though the legislature was not literally consistent with the use of language in section 903A.3(2), we think the words "appeal" and "review" in this section are close enough in meaning to be synonymous.
For example, Black's Law Dictionary defines "appeal" and "review" synonymously. It defines "appeal" as a "resort to a superior court to review the decision of an inferior court or administrative agency." Black's Law Dictionary 88 (5th ed. 1979) (emphasis added). It defines "review" in the following manner:

*794 To re-examine judicially or administratively. A reconsideration; second view or examination; revision; consideration for purposes of correction. Used especially of examination of a cause by an appellate court or appellate administrative body (e.g. Appeals Council in Social Security cases). See Appeal. . . .
Id. at 1186. See also Ellsworth v. Insurance Co. of N. Am., 508 So.2d 395, 398 (Fla.Dist.Ct.App.1987) (appeal "is a proceeding to review a judgment or order of a lower tribunal based on the record made before the lower tribunal") (emphasis added). This closeness in meaning leads us to conclude that the legislature used the word "appeal" in section 663A.2(6) in its generic sense to include the two levels of examination in section 903A.3(2). Cf. Kent v. Civil Serv. Merit Bd. of Shelby County, 652 S.W.2d 350, 351 (Tenn.App.1983) (use of word "appeal" in statute governing appeal from decision of county civil service review board is in its generic sense and simply means review in state court of record); Griffitts v. Rockford Utility Dist., 41 Tenn.App. 653, 654, 298 S.W.2d 33, 34 (1956) ("appeal" often designates generally any method for removal of case from inferior to higher court for review).
For several reasons we think our interpretation is reasonable and best accomplishes what we think the legislature intended. First, the legislature uses the words "subject to" when referring to the review by the director in section 903A.3(2). These are words of limitation. When using these words, the legislature was simply saying prisoners must exhaust this level of examination before seeking postconviction relief. Second, section 903A.4 delegates responsibility to the director to develop policy and procedural rules "specify[ing] disciplinary offenses which may result in the loss of good conduct time, and the amount of good conduct time which may be lost as the result of each disciplinary offense." Iowa Code § 903A.4. It seems reasonable to us then, that the director should have the last say as to whether, and for how long, prisoners forfeit such good conduct time. Finally, our interpretation is consistent with the cited reasons underlying the exhaustion doctrine. We conclude section 663A.2(6) requires prisoners to exhaust both levels of examination in section 903A.3(2) before seeking postconviction relief in the district court.
Because section 903A.3(2) satisfies both conditions of the exhaustion doctrine, "we have a mandatory duty to recognize that the jurisdiction of the district court was not properly invoked" by the postconviction relief action. City of Des Moines, 360 N.W.2d at 733. So the district court erred when it did not sustain the State's motion to dismiss. We therefore vacate and remand the case to the district court for an order of dismissal.
Aschan raises several other issues that we do not address because they are not properly before us.
JUDGMENT VACATED AND CASE REMANDED.
