
    STATE of Iowa, Appellee, v. Angela Marie ALLEN, Appellant.
    No. 04-1561.
    Supreme Court of Iowa.
    Jan. 20, 2006.
    
      Linda Del Gallo, State Appellate Defender, and Theresa R. Wilson, Assistant State Appellate Defender, for appellant.
    Thomas J. Miller, Attorney General, Bridget A. Chambers, Assistant Attorney General, Timothy N. Schott, County Attorney, and Sarah J. Livingston and Ricki Osborn, Assistant County Attorneys, for appellee.
   WIGGINS, Justice.

Angela Marie Allen contends her trial counsel was ineffective in permitting her to enter a guilty plea to the charge of introducing a controlled substance into a detention facility under Iowa Code section 719.8 (2003) for the reason that the Fort Dodge Correctional Facility was not a “detention facility” for purposes of section 719.8. Because we agree with Allen that the Fort Dodge Correctional Facility was not a “detention facility” under section 719.8, there was no factual basis supporting her plea. Additionally, when no factual basis exists for a plea, we presume prejudice. Therefore, we vacate the decision of the court of appeals, reverse the judgment of the district court, and remand the case for further proceedings consistent with this opinion.

I. Background Facts and Proceedings.

In March 2004, Allen’s husband was incarcerated at the Fort Dodge Correctional Facility. An electronics engineer at the facility monitored a telephone call made between Allen and her husband enabling him to determine Allen and her husband were planning to bring drugs into the facility the following day. The Fort Dodge Correctional Facility officials contacted the Fort Dodge Police Department. The police obtained a search warrant for Allen’s person and searched her after she entered the facility for a visitation. During the search, the authorities found marijuana on her person.

Allen was charged by trial information in three separate counts for: (1) possession with intent to deliver a controlled substance and/or conspiracy to deliver a controlled substance in violation of Iowa Code section 124.401(l)(d); (2) introducing a controlled substance into a detention facility and/or conspiracy to introduce a controlled substance into a detention facility in violation of Iowa Code sections 719.8 and/or 706.1 and 719.8; and (3) possession of contraband in a correctional institution and/or conspiracy to possess contraband in a correctional institution in violation of Iowa Code sections 719.7 and/or 706.1 and 719.7.

Pursuant to a plea agreement, the State agreed to dismiss the possession with intent to deliver charge and remain silent at sentencing if Allen pled guilty to the two remaining charges. Allen accepted the plea agreement, the State dismissed the possession with intent to deliver charge, and Allen pled guilty to the two remaining charges. At sentencing, Allen received an indeterminate five-year term of imprisonment on each of the two remaining charges and was ordered to pay fines, costs, and attorney fees. The sentencing judge also ordered the prison terms to be served consecutively to each other.

Allen appealed. We transferred her case to our court of appeals. In the court of appeals, she claimed her trial counsel was ineffective in permitting her to plead guilty to the charge of introducing a controlled substance into a detention facility under Iowa Code section 719.8 and in failing to move in arrest of judgment to set aside the plea for lack of a factual basis, arguing the Fort Dodge Correctional Facility was not a “detention facility.” Allen also claimed her trial counsel was ineffective in failing to object to the court’s acceptance of the guilty plea or failing to move in arrest of judgment to set aside the plea for lack of a knowing and voluntary plea, asserting the sentencing court failed to advise her of the possibility of consecutive sentences.

The court of appeals reversed Allen’s conviction as to the charge of introducing a controlled substance into a detention facility in violation of Iowa Code section 719.8, finding her guilty plea lacked a factual basis in view of the fact that the Fort Dodge Correctional Facility was not a “detention facility.” The court of appeals affirmed Allen’s conviction as to the remaining charge, concluding Allen did not show she would not have pled guilty had the court advised her of the possibility of consecutive sentences. We granted the State’s application for further review.

II. Preservation of Error.

The district court advised Allen at the guilty plea hearing that the timely filing of a motion in arrest of judgment was required to challenge the plea. She faded to do so. Although Allen’s failure to file such a motion prevents her from directly appealing her conviction, “this failure will not bar a challenge to a guilty plea if the failure to file a motion in arrest of judgment resulted from the ineffective assistance of counsel.” State v. Brooks, 555 N.W.2d 446, 448 (Iowa 1996). Accordingly, “[a]n ineffective-assistance-of-counsel claim falls within an exception to the general rule that a party must preserve error in the district court.” State v. Doggett, 687 N.W.2d 97, 100 (Iowa 2004). Consequently, we will review Allen’s claims as claims of ineffective assistance of counsel.

III. Scope of Review.

The issue presented for further review by the State is whether the court of appeals was correct in holding Allen’s trial counsel was ineffective in permitting her to enter a guilty plea to the charge of introducing a controlled substance into a detention facility under Iowa Code section 719.8 without a factual basis for the plea. Claims involving the ineffective assistance of counsel have their basis in the Sixth Amendment of the United States Constitution and are reviewed de novo. State v. Wills, 696 N.W.2d 20, 22 (Iowa 2005). Although these claims are typically preserved for postconviction relief actions, “we will address such claims on direct appeal when the record is sufficient to permit a ruling.” Id. In addition, to the extent Allen’s argument raises issues of statutory interpretation, our review is for correction of errors at law. Id.

The State seeks further review of only that part of the court of appeals decision reversing Allen’s conviction for introducing a controlled substance into a detention facility due to a lack of a factual basis for her plea. Allen did not file a resistance to the State’s application for further review. In situations such as this, “we have the discretion to review any issue raised on appeal regardless of whether such issue is expressly asserted in an application for further review.” In re Marriage of Olson, 705 N.W.2d 312, 315 (Iowa 2005). Allen also claimed on appeal that her trial counsel was ineffective for failing to object to the court’s acceptance of the guilty plea or failing to move in arrest of judgment to set the plea aside for lack of a knowing and voluntary plea on the basis the sentencing court failed to advise her of the possibility of consecutive sentences. Although we have the discretion to review this issue, we do not reach it because our holding on the issue raised by the State in its application for further review is dispositive of this appeal.

IV. Analysis.

“In order for a defendant to succeed on a claim of ineffective assistance of counsel, the defendant must prove: (1) counsel failed to perform an essential duty and (2) prejudice resulted.” Wills, 696 N.W.2d at 22; see also Strickland v. Washington, 466 U.S. 668, 687, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674, 693 (1984). Defense counsel fails to perform an essential duty when counsel allows the defendant to plead guilty to a charge for which there is no factual basis and thereafter does not file a motion in arrest of judgment challenging the plea. Brooks, 555 N.W.2d at 448; see also Iowa R.Crim. P. 2.8(2)(&) (stating a court “shall not accept a plea of guilty without first determining that the plea ... has a factual basis”).

Allen asserts her guilty plea lacked a factual basis to the charge of introducing a controlled substance into a detention facility under Iowa Code section 719.8 because the Fort Dodge Correctional Facility was not a “detention facility.” This assertion requires us to interpret section 719.8. When confronted with the task of statutory interpretation, we have stated:

The goal of statutory construction is to determine legislative intent. We determine legislative intent from the words chosen by the legislature, not what it should or might have said. Absent á statutory definition or an established meaning in the law, words in the statute are given their ordinary and common meaning by considering the context within which they are used. Under the guise of construction, an interpreting body may not extend, enlarge or otherwise change the meaning of a statute.

Auen v. Alcoholic Beverages Div., 679 N.W.2d 586, 590 (Iowa 2004) (citations omitted). Legislative intent is derived not only from the language used but also from “the statute’s ‘subject matter, the object sought to be accomplished, the purpose to be served, underlying policies, remedies provided, and the consequences of the various interpretations.’ ” Cox v. State, 686 N.W.2d 209, 213 (Iowa 2004) (citations omitted).

In addition, the legislative history of a statute is instructive and we may consider it when ascertaining legislative intent. Richards v. Iowa Dep’t of Revenue, 362 N.W.2d 486, 488 (Iowa 1985); see also Chelsea Theater Corp. v. City of Burlington, 258 N.W.2d 372, 374 (Iowa 1977) (explaining “[t]he striking of a provision before enactment of a statute is an indication the statute should not be construed to include it”); Iowa Code § 4.6(3) (stating the court may consider the legislative history of an ambiguous statute in determining legislative intent). Also, “[t]he interpreter may look to prior enactments of the statute for guidance.” Christenson v. Iowa Dist. Ct., 557 N.W.2d 259, 261 (Iowa 1996); see also Iowa Code § 4.6(4) (stating the court may consider former statutory provisions in regards to an ambiguous statute in determining legislative intent).

Furthermore, the interpretation of a statute requires an assessment of the statute in its entirety, not just isolated words or phrases. State v. Young, 686 N.W.2d 182, 184-85 (Iowa 2004). Indeed, “we avoid interpreting a statute in such a way that portions of it become redundant or irrelevant.” T & K Roofing Co. v. Iowa Dep’t of Educ., 593 N.W.2d 159, 162 (Iowa 1999). Finally, it is necessary to remember we construe criminal statutes strictly with doubts resolved in the accused’s favor. State v. Schultz, 604 N.W.2d 60, 62 (Iowa 1999).

The legislature enacted section 719.8 in its present form during the 1999 legislative session. Prior to this most recent amendment, section 719.8 provided:

A person not authorized by law who furnishes or knowingly makes available a controlled substance to an inmate at a detention facility or correctional institution, or at an institution under the management of the Iowa department of corrections, or who introduces.a controlled substance into the premises of such an institution, commits a class “D” felony.

Iowa Code § 719.8 (1999). At the same time, section 719.7 provided:

A person not authorized by law who furnishes or knowingly makes available an intoxicating beverage to an inmate at a detention facility, correctional institution, or an institution under the management of the Iowa department of corrections, or who introduces an intoxicating beverage into the premises of such an institution, commits a class “D” felony.

Id. § 719.7 (1999).

During the 1999 legislative session, the committee on judiciary introduced senate file 101. S.F. 101, 78th Gen. Assem., Reg. Sess. (Iowa 1999). Senate file 101 combined sections 719.7 and 719.8 by making it unlawful to knowingly introduce a controlled substance or intoxicating beverage “into, or onto the grounds of, a secure facility for the detention or custody of juveniles or a jail, detention facility, correctional institution, or institution under the management of the department of corrections” under section 719.7 of the Code. Id. Senate file 101 also repealed section 719.8 of the Code. Id. Because the proposed legislation created or significantly changed an existing public offense,..the Code required a correctional impact statement on the fiscal impact of the amendment prior to any debate on senate file 101. Iowa Code § 2.56(l)-(2) (1999).

The legislative fiscal bureau issued the correctional impact statement estimating the fiscal impact of senate file 101 for fiscal years 2000, 2001, and 2004 to be $4,280,000 to the state general fund and $1,225,000 to the counties. S.F. 101 Fiscal Note, 78th Gen. Assem., Reg. Sess. (Iowa 1999). After. receiving this statement, Senator McKean offered an amendment to senate file 101. Amend. S-3071 to S.F. 101, 78th Gen. Assem., Reg. Sess. (Iowa 1999). Senator McKean’s amendment removed the language from the bill making it unlawful to knowingly introducé a controlled substance or intoxicating beverage into, or onto the grounds of, “a secure facility for the detention or custody of-juveniles or a jail, [or a] detention facility” under section 719.7. Id. In addition, his amendment did not repeal section 719.8, but amended it as follows:

A person not authorized by law who furnishes or knowingly makes available a controlled substance or intoxicating beverage to an inmate at a detention facility, or who introduces a controlled substance or intoxicating beverage into the premises of such a facility, commits a class “D” felony.

Id. A revised correctional impact statement was issued for Senator McKean’s amendment. Amend. S-3071 to S.F. 101 Fiscal Note, 78th Gen. Assem., Reg. Sess. (Iowa 1999). The revised statement noted Senator' McKean’s amendment “establishes the offense -of promoting or possessing contraband in correctional [institutions]” and it “changes the original Bill so that the penalties are applicable only to [institutions] under the [management] of the Department of Corrections and removes reference to jails and other detention facilities.” Id. The revised statement estimated the fiscal impact of Senator McKean’s amendment to senate file 101, limiting, section 719.7’s application to correctional institutions and institutions under the management of the department of corrections, for fiscal years 2000, 2001, and 2004 to be $210,000 to the state general fund with restitution to the general fund of $11,100. Id. The legislature passed senate file 101 as amended by Senator McKe-an. . We assume one of the reasons the legislature passed the.original amendment with Senator McKean’s amendment was to avoid the added expense of including detention facilities, as these facilities were removed from the original amendment by the McKean amendment.

The legislature’s choice to limit section 719.7 to correctional institutions and institutions under the management of the department of corrections and to apply similar prohibitions to detention facilities in section 719.8 indicates a legislative intent that correctional institutions and institutions under the management of the department of corrections not be included in section 719.8. See Chelsea Theater Corp., 258 N.W.2d at 374 (stating the legislature’s striking of a provision indicates the statute should not be interpreted to include it). The parties concede the Fort Dodge Correctional Facility is under the management of the department of corrections; therefore, it would not be a violation of section 719.8 to introduce a controlled substance into that facility under this interpretation.

This interpretation is consistent with our prior decision interpreting section 719.7. State v. Mitchell, 650 N.W.2d 619 (Iowa 2002). There we held a county jail was not a “correctional institution” for purposes of section 719.7. Id. at 620. In Mitchell, we noted the court of appeals determined “because a prior reference to ‘detention facility’ had been removed from section 719.7 and ... section 719.8 now provides the basis for a criminal charge of conveying contraband in a ‘detention facility,’ [Mitchell] was charged under the wrong statute,” section 719.7. Id. We agreed with the court of appeals’ conclusion because a county jail was a “detention facility” and not a “correctional institution” under the statute. Id.

The State refutes the applicability of Mitchell by claiming that case involved the interpretation of section 719.7, which specifically refers to correctional institutions, and thus the case did not address the converse issue of whether a “correctional institution” is a , “detention facility.” We find the State’s argument unpersuasive in view of the fact section 719.8 was amended alongside section 719.7. See Young, 686 N.W.2d at 184-85 (requiring the interpretation of a statute in its entirety).

The 1999 amendment effectively changed the statutory scheme from one of separation of intoxicating beverages in section 719.7 and controlled substances in section 719.8 to one of separation of correctional institutions in section 719.7 and detention facilities in section 719.8. In Mitchell, we acknowledged the 1999 amendment to sections 719.7 and 719.8 resulted in separate bases for such charges depending on whether a “correctional institution” or a “detention facility” is involved. 650 N.W.2d at 620. Accordingly, the State’s claim that “correctional institution” is encompassed by “detention facility” is contrary to the legislature’s pointed division of those establishments into two separate statutory sections.

Therefore, we hold the intent of the legislature was to exclude a facility such as the Fort Dodge Correctional Facility from the term “detention facility” for purposes of section 719.8. Consequently, there was no factual basis for Allen’s guilty plea to the charge of introducing a controlled substance into a detention facility under Iowa Code section 719.8, and Allen’s trial counsel failed to perform an essential duty in not challenging her plea.

In situations where counsel failed to perform an essential duty in not challenging a plea for lack of a factual basis, we have held the failure to attack the plea “violates the letter and spirit of Iowa Rule of Criminal Procedure 8(2)(b),” now rule 2.8(2)(6). State v. Hack, 545 N.W.2d 262, 263 (Iowa 1996). In other words, trial counsel’s failure to contest the plea in this circumstance results in prejudice per se. To hold otherwise “would erode the integrity of all pleas and the public’s confidence in our criminal justice system.” Id.

Allen pled guilty to violating sections 719.7 and 719.8 as a result of a plea bargain to dismiss the possession with intent to deliver charge. The proper remedy when counsel fails to perform an essential duty by not challenging a plea for lack of a factual basis when the plea is a result of a plea bargain is to invalidate the entire plea bargain, including the dismissal of the possession with intent to deliver charge and the plea to section 719.7, and remand the case to the district court. See Mitchell, 650 N.W.2d at 621 (holding when a plea bargain is changed due to a lack of a factual basis on a charge to which the defendant pled, the entire plea bargain is invalidated and the State may proceed as though the plea bargain did not exist). On remand, the State may reinstate any charges dismissed in contemplation of a valid plea bargain, if it so desires, and file any additional charges supportable by the available evidence. See id. (allowing the State to reinstate a charge dismissed as part of a plea bargain when the defendant pled to a crime for which there was no factual basis); Hack, 545 N.W.2d at 263 (allowing the State to reinstate a charge dismissed as part of a plea bargain or recharge the defendant under a Code section supported by the evidence when the defendant pled to a crime for which there was no factual basis). The State may also proceed against Allen on the charge of possession of contraband under section 719.7.

We need not reach Allen’s claim of ineffective assistance of counsel for her trial counsel’s failure to object to the court’s acceptance of the guilty plea or failure to move in arrest of judgment to set the plea aside for lack of a knowing and voluntary plea on the basis that the sentencing court failed to advise her of the possibility of consecutive sentences because our holding on the first issue is dispositive of the case.

V. Disposition.

Because Allen’s counsel was ineffective for not challenging her plea for lack of a factual basis, we vacate the decision of the court of appeals, reverse Allen’s convictions under sections 719.7 and 719.8, and remand the case to the district court where the State may reinstate any charges dismissed in contemplation of a valid plea bargain, file any additional charges supportable by the available evidence, and proceed against Allen on the charge of possession of contraband under section 719.7.

DECISION OF COURT OF APPEALS VACATED; DISTRICT COURT JUDGMENT REVERSED AND CASE REMANDED. 
      
      . The correctional impact statement referenced fiscal years 2000, 2001, and 2004 but did not reference fiscal years 2002 and 2003. S.F. 101 Fiscal Note, 78th Gen. Assem., Reg. Sess. (Iowa 1999).
     
      
      . The revised correctional impact statement referenced'fiscal years 2000, 2001, and 2004 but did not reference fiscal years 2002 and 2003. Amend. S-3071 to S.F. 101 Fiscal Note, 78th Gen. Assem., Reg. Sess. (Iowa 1999).
     