
247 Wis.2d 871 (2001)
2001 WI App 220
634 N.W.2d 893
STATE of Wisconsin, Plaintiff-Respondent,
v.
Joel O. PETERSON, Defendant-Appellant.[]
No. 01-0116-CR.
Court of Appeals of Wisconsin.
Submitted on briefs July 9, 2001.
Decided August 23, 2001.
*873 On behalf of the defendant-appellant, the cause was submitted on the briefs of William E. Schmaal, Asst. State Public Defender, of Madison.
*874 On behalf of the plaintiff-respondent, the cause was submitted on the brief of James E. Doyle, Attorney General, and Sally L. Wellman, Asst. Attorney General.
Before Vergeront, P.J., Dykman and Roggensack, JJ.
¶ 1. VERGERONT, P.J.
Joel Peterson challenges the repeater penalty portions of his sentences for two counts of second-degree intentional homicide, to which he pleaded guilty as a repeater as part of a plea agreement. He contends that the repeater portion of each sentence is void because, at the time he entered his pleas of not guilty at the arraignment, neither the complaint nor the information charged him as a repeater as required by WIS. STAT. § 973.12(1) (1999-2000).[1] Therefore, he asserts, the trial court lacked authority to sentence him as a repeater, even though the information was amended pursuant to the plea agreement to allege the prior convictions, and even though he entered guilty pleas to the charges in the amended information and agreed the repeater allegations were accurate.
¶ 2. We conclude that WIS. STAT. § 973.12(1) does not prohibit Peterson from agreeing, after arraignment and entry of a not guilty plea and as part of a plea agreement, to amend the information to add repeater allegations. We therefore reject his argument that the trial court lacked the authority to sentence him as a repeater and that the repeater penalty portions of his sentences are void. Accordingly, we affirm the judgment of conviction and sentences and the order denying his postconviction motion.


*875 BACKGROUND
¶ 3. The complaint, filed on August 23, 1999, charged Peterson with first-degree intentional homicide of his girlfriend, Stacie Fankhauser, contrary to WIS. STAT. § 940.01(1), and with hiding her corpse with intent to conceal a crime, contrary to WIS. STAT. § 940.11(2). The first crime carries a punishment of mandatory life imprisonment, WIS. STAT. § 939.50(3)(a), and the second, a Class D felony, carried at the time a maximum fine of $10,000 and/or five years in prison. Section 939.50(3)(d) (1997-98). The court appointed counsel to represent Peterson and Peterson waived a preliminary hearing. An information filed on September 28, 1999, charged the two offenses alleged in the complaint and, at an arraignment on the following day, Peterson entered a not guilty plea to each charge. Neither the complaint nor the information alleged that Peterson was a repeater under WIS. STAT. § 939.62.[2]
¶ 4. On March 14, 2000, Peterson appeared in court with counsel at a scheduled plea hearing. The prosecutor explained to the court that the parties had *876 reached an agreement whereby the State would file an amended information charging two counts of second-degree intentional homicide (one for Fankhauser and one for her unborn child), each count having a maximum penalty of fifty years imprisonment based on Peterson being an habitual criminal, and one count of hiding a corpse. Peterson would plead guilty to these charges, the parties would request a presentence investigation, and each party would be free to argue at sentencing. At the court's request, the prosecutor read the amended information into the record. The amended information charged Peterson with one count of intentionally causing the death of another contrary to WIS. STAT. § 940.05(1)(b), with a maximum penalty enhanced for habitual criminality under WIS. STAT. § 939.62(1)(c) of fifty years (Count 1), and one count of intentionally causing the death of an unborn child under § 940.05(2g)(b), also with a maximum penalty enhanced for habitual criminality of fifty years (Count 2).[3] The amended information alleged three *877 prior convictions for felony bail jumping, with dates, case numbers, and county. The amended information also contained as Count 3 the same offense of hiding a corpse that was alleged in the complaint and stated the maximum penalty for this offense  $10,000 fine and/or five years imprisonment.[4]
¶ 5. The court permitted the filing of the amended information. The court ascertained that there was nothing in the amended information that came as a surprise to defense counsel, he had had a chance to go over it with Peterson, and Peterson was prepared to answer it. The court asked Peterson whether he understood the charge in Count 1 and the maximum potential penalty, and asked the same questions with respect to Count 2. Peterson answered yes to all four questions. After asking Peterson other questions relevant to the entry of his plea but not relevant to this appeal, the court again asked Peterson if he understood the charges and the maximum potential penalties, and he answered yes. The numerous questions that followed to ascertain Peterson's understanding of the plea agreement included the question whether Peterson understood that the court could decide to impose as a sentence up to the 105 total years available, and Peterson answered yes.
¶ 6. After the court found that Peterson understood the elements of all three counts in the amended information, the prosecutor asked permission to file the certified judgments of the prior convictions. Defense counsel stated he had no objection and the court *878 received them. The court then read the date and charge contained in each of the certified judgments and, for each, asked Peterson whether he agreed that he was convicted on that date of that charge; Peterson answered yes with respect to each conviction. The court asked Peterson if he was satisfied with the record of his repeater allegation, and Peterson answered yes.
¶ 7. Based on these and other questions, the court accepted Peterson's guilty pleas and entered a judgment of conviction on each of the three counts.
¶ 8. Sentencing took place on May 30, 2000. The court sentenced Peterson to fifty years each on Counts 1 and 2, consecutive to one another, and five years on Count 3, concurrent to Count 2. Subsequently, Peterson filed a motion asking the court to commute the sentences on Counts 1 and 2 to forty years each because the repeater enhancement of ten years on each was void. Peterson contended that WIS. STAT. § 973.12(1), as construed by the supreme court in State v. Martin, 162 Wis. 2d 883, 902-07, 470 N.W.2d 900 (1991), required that the complaint or information allege Peterson's repeater status before the September 29, 1999 arraignment and acceptance of his not guilty pleas. Section 973.12(1) provides in relevant part:
Sentence of a repeater or persistent repeater. (1) Whenever a person charged with a crime will be a repeater or a persistent repeater under s. 939.62 if convicted, any applicable prior convictions may be alleged in the complaint, indictment or information or amendments so alleging at any time before or at arraignment, and before acceptance of any plea. The court may, upon motion of the district attorney, grant a reasonable time to investigate possible prior convictions before accepting a plea. If the prior convictions are admitted by the defendant or proved by the state, *879 he or she shall be subject to sentence under s. 939.62 unless he or she establishes that he or she was pardoned on grounds of innocence for any crime necessary to constitute him or her a repeater or a persistent repeater.
¶ 9. At oral argument on his motion, Peterson's postconviction counsel agreed with the court that the homicide charges in the amended information, including the repeater enhancements, represented a reduction from the homicide charges in the complaint; and he agreed that the amended information contained no surprise to Peterson. Postconviction counsel also stated that he had no basis for arguing that defense counsel did not act in a completely appropriate way, and he agreed he had found no flaw in the court's taking of the pleas, explaining to Peterson what was going on, and ascertaining that Peterson entered into the plea agreement knowingly, voluntarily, and intelligently. Even so, postconviction counsel argued, WIS. STAT. § 973.12(1), as construed by Martin, required the filing of a new complaint containing the repeater allegations before Peterson pleaded to them, and Peterson could not waive that defect because it was a matter of the court's subject matter jurisdiction.
¶ 10. The trial court denied the motion. The court concluded that the purpose of WIS. STAT. § 973.12(1), as articulated in Martin, was to prevent a defendant from being unfairly surprised by the addition of an enhanced penalty for repeater status, and that did not occur in this case.

DISCUSSION
¶ 11. On appeal, Peterson contends as he did in the trial court that the supreme court's construction of WIS. STAT. § 973.12(1) in Martin is controlling in this *880 case and prohibits the amendment to the information to add repeater allegations. Peterson asserts that the trial court's focus on the lack of unfairness or prejudice to him is incorrect because the supreme court interpreted § 973.12(1) to prohibit an amendment adding repeater allegations to the information after a defendant has pleaded not guilty at an arraignment no matter what the circumstances  even if the defendant agrees to the amendment, benefits from it, and enters a plea to the charges in the amended information.
[1]
¶ 12. Because a resolution of this issue requires us to construe WIS. STAT. § 973.12(1) as applied to a set of undisputed facts, it presents a question of law, which we review de novo. State v. Setagord, 211 Wis. 2d 397, 405-06, 565 N.W.2d 506 (1997).
[2-6]
¶ 13. The purpose of statutory interpretation is to discern the intent of the legislature. Id. at 406. To do so, we first consider the language of the statute. If the language of the statute clearly and unambiguously sets forth the legislative intent, we apply that to the case at hand and do not look beyond the statutory language to ascertain its meaning. Id. A statute is ambiguous when it is capable of being understood in two or more different senses by reasonably well-informed persons. Id. If a statute is ambiguous, we look to the scope, history, context, subject matter, and object of the statute in order to ascertain legislative intent. Id. Whether a statute is ambiguous is a question of law. Awve v. Physicians Ins. Co. of Wis., Inc., 181 Wis. 2d 815, 822, 512 N.W.2d 216 (Ct. App. 1994).
¶ 14. In Martin, the supreme court construed WIS. STAT. § 973.12(1) in the context of the State's motions to amend an information to add repeater allegations after *881 the defendants had pleaded not guilty at arraignment and before the completion of their trials. The trial courts granted the motions over the defendants' objections.[5] Because Martin is central to Peterson's position, we discuss it in some detail.
¶ 15. Before the supreme court, the State argued that WIS. STAT. § 973.12(1) was ambiguous because it did not expressly prohibit a trial court from allowing a repeater amendment after arraignment and plea acceptance; the State asked the supreme court to allow trial courts to exercise discretion on whether to permit repeater amendments after a defendant is arraigned, and to permit these amendments when there is no prejudice to the defendant. Martin, 162 Wis. 2d at 892. Under this proposed construction, the statute addresses only when a prosecutor may amend an information without leave of court and does not address when a trial court may allow an amendment. Id.
¶ 16. The supreme court rejected this construction. The court reasoned that the second sentence of WIS. STAT. § 973.12(1), which expressly allows the State to seek an extension of time from the trial court to investigate prior convictions "before acceptance of any plea," indicates that the trial court's ability to exercise discretion is limited to the time period prior to plea acceptance. Id. at 896. The court continued:
It would strongly appear, therefore, that the plain language of sec. 973.12(1), Stats., establishes a statutory *882 rule: A prosecutor needs to allege a defendant's repeater status in the appropriate charging document prior to arraignment and plea. But because the statute does not directly address the post-arraignment and plea-acceptance time period, such a conclusion would essentially require the application of the rule of expressio unius est exclusio alterius, which in turn calls for a more thorough examination of legislative intent by looking outside the four corners of the statute. Although we conclude that sec. 973.12(1) is unambiguous as to whether a repeater amendment can be made after arraignment and plea acceptance, we examine the statutory language "in relation to its context, subject matter, scope, history, and object intended to be accomplished."
Id. (footnote omitted; citation omitted).[6]
¶ 17. The supreme court then undertook a lengthy review of the legislative history of the statute and concluded:
[A]ny argued, though nonexistent, ambiguity has been resolved by this examination of the statutory evolution of sec. 973.12, Stats. The statutory changes make clear that the legislature has established the time of arraignment and of any plea acceptance as the cut-off *883 point after which time a defendant can no longer face exposure to repeater enhancement for the crime set forth in the charging document and pleaded to by the defendant at arraignment. As we noted in Block v. State, 41 Wis. 2d 205, 210, 163 N.W.2d 196 (1968), when analyzing the 1965 amendment to the repeater statute:
"Being a repeater is not a crime but may enhance the punishment of the crime for which the repeater is convicted. The allegation of recidivism is put in the information in order to meet the due-process requirements of a fair trial. When the defendant is asked to plead, he is entitled to know the extent of his punishment of the alleged crime, which he cannot know if he is not then informed that his prior convictions may be used to enhance the punishment. [Emphasis supplied.]"
Id. at 900-01 (footnotes omitted).
¶ 18. With respect to the State's argument that prejudice to the defendant should be the deciding factor, the court stated:
We agree with Martin and Robles that proof of prejudice is an irrelevant consideration under sec. 973.12(1), Stats. The legislature has established a rule. Regardless of the kind of plea entered in response to the charges alleged at arraignment, the defendant's plea will be more meaningful if he or she is aware of the extent of potential punishment which ensues from a conviction of the crime.
Id. at 902-03 (footnote omitted).
¶ 19. The State also offered an alternative construction of the statute, which focused on what the State asserted was the ambiguity of the term "acceptance of any plea." Id. at 893. That term, the State contended, should be construed not to include a not guilty plea, which is entered but not accepted; it should be construed to include only a guilty and a no contest *884 plea, which are both entered and accepted. Id. at 904. The court concluded there was no ambiguity on this point in the first sentence because of the phrase "before or at arraignment, and" which preceded "before acceptance of any plea." Id. at 905. Although the second sentence did not contain this qualifying phrase, the court reasoned that the second sentence must be read together with the first sentence; the court also decided that the term "any plea" and the legislative history previously examined showed a legislative intent to include not guilty pleas. Id. at 906-07.
[7]
¶ 20. In Peterson's argument that Martin is dispositive here, he relies on the supreme court's ruling that WIS. STAT. § 973.12(1) is not ambiguous and on its statements that "proof of prejudice is an irrelevant consideration.... The legislature has established a rule." Id. at 902. However, a statute may be ambiguous in one factual setting and unambiguous in another. Reyes v. Greatway Ins. Co., 227 Wis. 2d 357, 365, 597 N.W.2d 687 (1999). "Permitting the facts of a case to gauge ambiguity simply acknowledges that reasonable minds can differ about a statute's application when the text is a constant but the circumstances to which the text may apply are kaleidoscopic." Seider v. O'Connell, 2000 WI 76, ¶ 43, 236 Wis. 2d 211, 612 N.W.2d 659.
¶ 21. Therefore, before we can make a reasoned decision on whether Martin answers the question of statutory construction presented in this case, we must consider the relation between the factual circumstances in Martin and those in this case. The court in Martin decided that WIS. STAT. § 973.12(1) was not ambiguous in the context of a trial court permitting the State, over *885 the objection of the defendant, to add a repeater allegation to an information after the defendant entered a not guilty plea at arraignment. That decision does not resolve whether the statute is ambiguous in the context of a defendant agreeing as part of a plea agreement to the addition of a repeater allegation to an information after the defendant has entered a not guilty plea at an arraignment. Accordingly, we conclude that Martin does not resolve the question of statutory construction before us.
¶ 22. Neither of the parties have brought to our attention a case construing WIS. STAT. § 973.12(1) in factual circumstances similar to those in this case. Therefore, we turn to a consideration of the statutory language in light of the factual circumstances of this case. We conclude that the language could reasonably be interpreted as Peterson proposes, but that his proposal is not the only reasonable interpretation. The statute could also be reasonably interpreted not to address the situation where a defendant agrees as part of a plea agreement to a post-arraignment amendment of an information to add repeater allegations. Nothing in the statutory language indicates that the legislature contemplated such a situation; and, since the agreement of a defendant to add repeater allegations to an information as part of a plea agreement significantly changes the defendant's interests that are at stake, one could reasonably expect that the legislature would not have intended to include that situation unless it expressly indicated that intent.
¶ 23. In order to resolve the statute's ambiguity in the context of this fact situation, we consider the legislative history which the court discussed in Martin. As the court there explained, prior to the last major *886 amendment of the statute in 1965,[7] the trial court could impose a repeater penalty "where the prior convictions were first discovered or alleged `at any time before execution of sentence has commenced,' `after conviction,' or after a `sentence has already been passed but execution thereof has not been commenced.'" Martin, 162 Wis. 2d at 899 (citation omitted). Thus, the statute in effect prior to the 1965 amendment permitted the trial court to impose a repeater penalty after a defendant had been convicted based on a guilty or no contest plea to charges contained in a charging document that did not contain repeater allegations.[8] The same was true under prior versions of the statute dating back to 1919. Id. at 898-99. In the 1965 amendment, the legislature deleted the foregoing quoted phrases; and, in place of "or otherwise brought to the attention of the court at any time before execution of sentence has *887 commenced," the legislature added "or amendments [to the complaint, indictment or information] so alleging at any time before or at arraignment, and before acceptance of any plea." Laws of 1965, ch. 422, § 2.
[8]
¶ 24. We conclude that one important purpose of deleting the quoted phrases was to avoid the unfairness and surprise that could result when a defendant is convicted based on a guilty or no contest plea without knowing that the penalty might be later enhanced because of his repeater status. There is nothing in the legislative history of which we are aware that indicates that, when choosing to add the phrase "or amendments so alleging at any time before or at arraignment, and before acceptance of any plea," the legislature considered a situation where the defendant agreed to add repeater allegations to a charging document as part of a plea agreement, nor is there any indication the legislature intended to preclude this. Moreover, allowing a defendant to agree to amend an information to add repeater allegations as part of an agreement to plead guilty or no contest is consistent with the goal of providing the defendant with all the information about the potential punishment at the time he or she pleads guilty or no contest.
¶ 25. In addition, we can see no purpose served by interpreting the statute to prevent a defendant from agreeing to add repeater allegations to an information as part of a plea agreement. Since a defendant need not agree to that amendment, presumably a defendant will agree only when he or she perceives it is in his or her interest to do so. For example, in this case, postconviction counsel acknowledged to the trial court that the amendment to the information benefited Peterson. The requirement that guilty and no contest pleas be knowing, *888 voluntary, and intelligent ensures that defendants will not be coerced into agreeing to the addition of repeater allegations that the State could not add unilaterally.
¶ 26. Peterson points out that under his construction of the statute, a defendant may agree to a dismissal of the complaint and the issuance of a new complaint and information with the repeater allegations and other amended charges, and then the defendant may enter the agreed upon plea. However, he does not identify any purpose served by construing the statute to require this procedure under the circumstances of this case, and we can discern none.
[9]
¶ 27. For the above reasons, we conclude that the legislature did not intend in WIS. STAT. § 973.12(1) to prohibit defendants from agreeing, after arraignment and entry of a not guilty plea and as part of a plea agreement, to amend charging documents to add repeater allegations. Accordingly, the repeater penalty portions of Peterson's sentences on Count 1 and 2 are not void and the trial court did not err in denying Peterson's motion to vacate those portions of his sentences.[9]
By the Court.  Judgment and order affirmed.
NOTES
[]  Petition to review denied 10-23-01.
[1]  All references to the Wisconsin Statutes are to the 1999-2000 version unless otherwise noted.
[2]  WISCONSIN STAT. § 939.62 provides in part:

Increased penalty for habitual criminality. (1) If the actor is a repeater, as that term is defined in sub. (2), and the present conviction is for any crime for which imprisonment may be imposed, except for an escape under s. 946.42 or a failure to report under s. 946.425, the maximum term of imprisonment prescribed by law for that crime may be increased as follows:
(a) A maximum term of one year or less may be increased to not more than 3 years.
(b) A maximum term of more than one year but not more than 10 years may be increased by not more than 2 years if the prior convictions were for misdemeanors and by not more than 6 years if the prior conviction was for a felony.
(c) A maximum term of more than 10 years may be increased by not more than 2 years if the prior convictions were for misdemeanors and by not more than 10 years if the prior conviction was for a felony.
(2) The actor is a repeater if the actor was convicted of a felony during the 5-year period immediately preceding the commission of the crime for which the actor presently is being sentenced, or if the actor was convicted of a misdemeanor on 3 separate occasions during that same period, which convictions remain of record and unreversed.
[3]  The penalty for a violation of WIS. STAT. § 940.05(1) and (2g), both Class B felonies, committed before December 31, 1999, was forty years each. WIS. STAT. § 939.50(3)(b) (1997-98). Thus, with the applicable repeater enhancement of ten years for each of these offenses, WIS. STAT. § 939.62(1)(c), the maximum enhanced penalty for each offense was fifty years.
[4]  Because the allegations regarding Count 3 did not contain repeater provisions, that count is not relevant to this appeal, and we omit some references to it in our summary of the plea hearing.
[5]  The court of appeals vacated the repeater enhancement portion of the defendants' sentences, State v. Martin, 156 Wis. 2d 399, 408, 456 N.W.2d 892 (Ct. App. 1990), and State v. Robles, 157 Wis. 2d 55, 63-64, 458 N.W.2d 818 (Ct. App. 1990), and the supreme court accepted the State's petition for review in both cases and consolidated them. State v. Martin, 162 Wis. 2d 883, 888, 470 N.W.2d 900 (1991).
[6]  In the footnote omitted in the text, the court further explained why it was examining legislative history even though it had concluded WIS. STAT. § 973.12(1) was unambiguous:

Section 973.12(1) is not ambiguous. We undertake an historical analysis only for the purpose of demonstrating that the legislative history makes clear that no repeater charge can be added after any plea. While legislative history cannot be used to demonstrate that a statute unambiguous on its face is ambiguous, there is no converse rule that statutory history cannot be used to reinforce and demonstrate that a statute plain on its face, when viewed historically, is indeed unambiguous.
Martin, 162 Wis. 2d at 897 n.5.
[7]  Laws of 1965, ch. 422, § 2.
[8]  WISCONSIN STAT. § 959.12 (1963) provided:

Sentence of repeater. (1) HOW PRIOR CONVICTION CHARGED AND DETERMINED. Whenever a person charged with a crime will be a repeater as defined in s. 939.62 if convicted, his prior conviction or convictions may be alleged in the complaint, indictment or information or otherwise brought to the attention of the court at any time before execution of sentence has commenced, and if such prior conviction or convictions be admitted by the defendant or proved by the state he shall be subject to be sentenced under s. 939.62 unless he shall establish that he was pardoned on grounds of innocence for any crime necessary to constitute him a repeater. If the defendant is alleged to be a repeater after conviction, the charge shall be reduced to writing unless it is admitted in open court, and the defendant may have a jury trial on that issue if it is demanded, otherwise the issue shall be tried by the court.... If sentence has already been passed but execution thereof has not been commenced before the court is informed that the defendant is a repeater, the court may set aside such sentence and resentence the defendant under s. 939.62.
[9]  Because of our resolution of this issue, we need not decide whether the State is correct in arguing that judicial estoppel bars Peterson from arguing on appeal that the repeater enhancement portions of his sentences are void.
