
234 P.3d 707 (2010)
STATE of Idaho, Plaintiff-Respondent,
v.
Clifford STEWART, Defendant-Appellant.
No. 36116-2009.
Supreme Court of Idaho, Boise, June 2010 Term.
June 25, 2010.
*709 Molly J. Huskey, State Appellate Public Defender, Boise, for appellant. Sarah E. Tompkins argued.
Hon. Lawrence G. Wasden, Attorney General, Boise, for respondent. Kenneth K. Jorgensen argued.
EISMANN, Chief Justice.
This is an appeal following a conditional plea of guilty to the crime of felony stalking. We vacate the judgment and remand for further proceedings that are consistent with this opinion.

I. FACTS AND PROCEDURAL HISTORY
On January 2, 2008, the Cassia County prosecutor filed a complaint charging Clifford Stewart (Defendant) with the crimes of stalking in the first degree, a felony, and violating a no contact order, a misdemeanor. As required by Idaho Criminal Rule 3, the prosecutor also filed the sworn affidavit of a complainant, a deputy sheriff, who submitted an affidavit setting forth the facts supporting the charges based upon information received from the victim. At his initial appearance, Defendant waived his right to a preliminary hearing on the stalking charge,[1] and he was bound over to the district court.
On January 17, 2008, the prosecutor filed an information in the district court charging Defendant with stalking in the first degree and with violating a no contact order. Defendant was arraigned on January 31, 2008, *710 and he entered pleas of not guilty to both charges.
On April 25, 2008, Defendant filed a motion to dismiss "for the reason that the State's Affidavit of Probable Cause does not state a course of conduct, as is necessary in the Statutes." That motion was argued four days later by Defendant's counsel and the prosecuting attorney. At the beginning of the hearing, the State was granted permission to file an amended information that had been prepared by a deputy prosecutor.
Defendant argued that, based upon information from a deputy prosecutor, there was insufficient evidence to convict him of the felony charge. In August 2007, Defendant had been convicted of misdemeanor stalking in Minidoka County based upon conduct concerning the same victim. The misdemeanor stalking statute, Idaho Code § 18-7906, requires for conviction a "course of conduct" that the statute defines as wrongful. It defines a "course of conduct" as "repeated acts of nonconsensual contact involving the victim or a family or household member of the victim." Idaho Code § 18-7906(2)(a). The felony statute, Idaho Code § 18-7905, requires: (a) that the defendant commit the crime of stalking as defined in the misdemeanor statute (which requires a course of conduct) and (b) that there be one of six additional circumstances. Defendant argued that the State's theory was that the prior misdemeanor conviction could satisfy the course-of-conduct requirement for the felony charge. Defendant argued that such construction does not comply with the statute and would violate the Double Jeopardy Clause. He contended that in order to commit a felony, there must be an additional course of conduct that could constitute misdemeanor stalking in addition to one of the six listed circumstances.
In response, the prosecutor stated that he disagreed with Defendant's reading of the statute. The prosecutor contended that the felony stalking statute should be construed like the felony DUI statute. He argued, "There are lots of cases, there's lots of statutes that have enhancements for additional violations of the same crime. You've got enhanced DUIs, you've got felony DUIs, you've got lots of different kinds of cases where there are enhancements."
The district court stated that Defendant seemed to be asserting that the State merely lacked sufficient evidence to prove the felony offense and asked whether Defendant was asking for a preliminary hearing. Defendant answered that he only needed the court to resolve the legal issue. The prosecutor then agreed, stating that they needed a ruling on how the statute should be interpreted. The prosecutor argued:
What we really need in this case, your Honor, and we do need a Court's determination, and that is whether or not this course of conductThere is only the one act on theon this felony. I mean, we're saying that if youthat this means if you've been convicted of a stalking and you do it again, it's a felony. And they're saying that when you do it again, you've got to do it at least a couple of times to get to course of conduct. We're saying that the course of conduct can go back to the prior action. So I think we do need a ruling on the statute itself as to what that means. It's not a question of us going back and adding more, because the victim in this case did not wait until there was she was victimized, and then she gets victimized again, and that's when she wanted us to bring a felony, which we did. She didn't want to wait, and we didn't want her to have to wait until she was victimized two or three times to meet this course of conduct. (Emphases added.)
Thus, the issue presented to the district court was whether the State could use the prior course of conduct upon which Defendant's misdemeanor conviction was based to satisfy the course-of-conduct requirement for felony stalking. When deciding this motion to dismiss, the district court did not address that issue. On June 4, 2008, it entered an order granting the motion to dismiss the amended information on the grounds: (1) that it did not allege any facts supporting the requirement that Defendant acted "knowingly"; (2) that it did not allege facts showing a "course of conduct"; and (3) it did not allege facts supporting the requirement that Defendant's alleged conduct "would cause a reasonable *711 person substantial emotion [sic] distress." The court gave the State fourteen days to amend its information.
On June 16, 2008, the State filed its second amended information. On July 23, 2008, Defendant filed another motion to dismiss "upon the grounds and for the reason that the State's Affidavit of Probable Cause does not state a course of conduct, as is necessary in the Statues [sic]." That motion was argued on September 29, 2008. Defendant basically restated the arguments he had made at the prior hearing. The deputy prosecutor at the hearing argued, "The fact of the matter is that the State and the defense and this Court does [sic] not know which repeated acts form the factual basis of his conviction for the second degree misdemeanor stalking case." He then argued that even if Defendant's version of the facts was correct, "if there's subsequent contact after a conviction and there's a no contact order, for example, as there is alleged in this case, then that should be sufficient for a felony."
On October 14, 2008, the district court issued its decision and denied the motion to dismiss. The court held that although the statute requires repeated acts constituting a course of conduct, "The statue [sic] provides no chronological or other time-related requirements regarding the acts, nor does the statue [sic] specifically bar consideration in the instant case of acts that occurred prior to the conviction in Minidoka County." With respect to the Double Jeopardy argument, the court stated that "for the sake of argument, the Court will accept Defendant's statements [of fact] as being true." It held that the felony statute "requires proof of at least one element that is different from the elements of Defendant's prior conviction," and therefore "the Double Jeopardy Clause is not implicated in this case."
The State and Defendant then entered into a conditional plea agreement. It provided that Defendant would plead guilty to the felony and the State would dismiss other charges. It added, "This plea is a conditional plea based upon the adverse ruling in Defendant's Motion to Dismiss, which he intends to appeal. Should the appellate court rule in his favor then he may withdraw his guilty plea." Defendant pled guilty, was sentenced, and timely appealed.

II. ANALYSIS
1. Motion to dismiss on the ground that the State's affidavit of probable cause was insufficient. This case was commenced by the State filing a criminal complaint. Idaho Criminal Rule 3 states, "The complaint shall be made upon oath before a magistrate; provided, a prosecuting attorney may, without oath or affirmation, sign a complaint before a magistrate based upon the sworn affidavit of a complainant, which shall be filed with the court." Because the complaint alleged that Defendant had committed the crime of felony stalking, he had a right to a preliminary hearing. State v. McGreevey, 17 Idaho 453, 463-64, 105 P. 1047, 1050 (1909); Idaho Const. Art. I, § 8; Idaho Code § 19-804; Idaho Crim. R. 5.1. The purpose of the preliminary hearing is to determine whether there is probable cause to believe that the defendant committed a felony. Id. A defendant who waives the right to a preliminary hearing waives the right to a probable cause determination regarding the charged felony. As we stated in State v. Hendricks, 80 Idaho 344, 348, 330 P.2d 334, 336 (1958) (citations omitted; emphases added):
In cases where a defendant, accused of a public offense triable in the district court, waives preliminary hearing, no depositions to support the charge in the district court are required. The accused in such circumstances is held to answer for the crime charged in the criminal complaint filed with the committing magistrate. If an accused desires testimony taken before the committing magistrate, he could, by demanding, secure a preliminary hearing, and ascertain the facts on which the charge was based. Respondent having waived such hearing, he is not now in a position to complain. Where a preliminary hearing is had the information thereafter filed in the district court does not depend on the complaint filed with the committing magistrate but on the commitment and the facts shown by the preliminary hearing.

*712 `A waiver of the preliminary examination by a person accused of a crime operates as an admission of the existence of sufficient evidence to justify the examining officer in holding him for trial. * * *'
Defendant, having waived his right to a preliminary hearing, admitted the existence of sufficient evidence to find that there was probable cause to believe that he committed the crime of felony stalking. He cannot thereafter challenge the existence of probable cause necessary to file an information to prosecute that crime.[2]
When the State filed the amended information and the second amended information, it also filed an amended affidavit of probable cause and a second amended affidavit. During the argument on his motion to dismiss, Defendant made reference to the sufficiency of the second amended affidavit. Even though it was filed after Defendant waived his right to a preliminary hearing, both of those affidavits have no significance with respect to the determination of probable cause.
As stated above, the purpose of the probable cause affidavit is to present a basis for filing the complaint. Idaho Crim. R. 3. If the complaint charges a felony and the defendant waives the preliminary hearing, the State can file an information charging the felony alleged in the complaint, or a crime that constitutes an included felony offense. State v. O'Neill, 118 Idaho 244, 249-50, 796 P.2d 121, 126-27 (1990). The State can also amend the information, without requiring a new probable cause determination, where the amended information does not add to or change the offense with which the defendant is charged, but merely adds an element necessary to charge that offense correctly. Id.;; Idaho Code § 19-1420; Idaho Crim. R. 7(e). In this case, the amended informations did not allege an offense different from that alleged in the complaint. Therefore, the amended and second amended affidavits served no function. Defendant having waived his right to a preliminary hearing, he admitted that there was sufficient evidence to establish probable cause with respect to the charge of felony stalking.
In the trial court, Defendant argued that it was his understanding from talking with a deputy prosecutor that the State's evidence of a course of conduct would be based upon the conduct for which Defendant was previously convicted. During oral argument on appeal, Defendant contended that the State's discovery responses showed that to be correct. The Idaho Rules of Criminal Procedure do not have a provision comparable to a motion for summary judgment found in the Idaho Rules of Civil Procedure. A defendant cannot have a case dismissed on the ground that the State's discovery responses show that it cannot prove the crime charged. The only somewhat comparable motion would be a motion to dismiss on the ground that the evidence at the preliminary hearing did not show probable cause to believe that the defendant had committed the felony charged. See, e.g., State v. O'Mealey, 95 Idaho 202, 506 P.2d 99 (1973). Of course, that motion would require that there was a preliminary hearing.
In summary, because Defendant waived his right to a preliminary hearing, he cannot dispute whether there is probable cause to believe he committed the felony charged. The district court did not err in denying his motion to dismiss the information on the ground that there was a lack of probable cause. Although the district court did not deny the motion on this basis, we affirm the denial on the correct theory. Nampa & Meridian Irrigation Dist. v. Mussell, 139 Idaho 28, 33, 72 P.3d 868, 873 (2003).
2. Motion to dismiss on the ground that this prosecution violated the Double Jeopardy Clause. A defendant can move to dismiss based upon former jeopardy. Idaho Crim. R. 12 b(6). Even though Defendant did not include that ground in his motion, he did argue double jeopardy as an alternative ground for his motion, and the district court addressed that issue. Therefore, we will consider it on appeal.
*713 "The double jeopardy clauses in the Idaho and federal constitutions prohibit putting one in jeopardy twice for the same crime. This protection applies not only to multiple punishments, but also to multiple prosecutions for the same crimes." State v. Manley, 142 Idaho 338, 343, 127 P.3d 954, 959 (2005). Defendant contended that the prosecution intended to use the incidents upon which his misdemeanor stalking conviction was based as the course of conduct required to establish the felony stalking charge. In its decision, the district court wrote, "The Defendant provides no factual or documentary support for this position. But for the sake of argument, the Court will accept Defendant's statements as being true." The court then ruled that even if the facts were as Defendant alleged, there would be no violation of the Double Jeopardy Clause. After the court denied the second motion to dismiss, Defendant pled guilty to felony stalking on the condition that if that ruling were reversed on appeal, he could withdraw his guilty plea.
In addressing the former jeopardy issue, the district court relied upon the Blockburger test. Under it, "where the same act or transaction constitutes a violation of two distinct statutory provisions, the test to be applied to determine whether there are two offenses or only one, is whether each provision requires proof of a fact which the other does not." Blockburger v. United States, 284 U.S. 299, 304, 52 S.Ct. 180, 182, 76 L.Ed. 306, 309 (1932). The district court correctly stated the Blockburger test, but misapplied it.
Idaho Code § 18-7905(1) states, "A person commits the crime of stalking in the first degree [a felony] if the person violates section 18-7906, Idaho Code, [misdemeanor stalking] and: [one of six listed circumstances exists]." The felony stalking statute incorporates by reference the misdemeanor stalking statute. Therefore, all of the elements of misdemeanor stalking are included in the crime of felony stalking.
The district court held that the Double Jeopardy Clause did not apply because felony stalking included an element that was not included in misdemeanor stalking. It wrote:
In the matter before this Court, it is clear that I.C. § 18-7905 requires proof of at least one element that is different from the elements of the Defendant's prior conviction of I.C. § 18-7906. In addition to the elements of § 18-7906, on this charge the State must prove any of the following: (a) The actions constituting the offense are in violation of a temporary restraining order, protection order, no contact order or injunction, or any combination thereof; or (b) The actions constituting the offense are in violation of a condition of probation or parole; or (e) The defendant has been previously convicted of a crime under this section or section 18-7906, Idaho Code, or a substantially conforming foreign criminal violation within seven (7) years, notwithstanding the form of the judgment or withheld judgment. I.C. § 18-7905. Therefore, the Double Jeopardy Clause is not implicated in this case.[3]
However, under the Blockburger test, each offense must contain an element not included in the other. Not only must felony stalking include an element not contained in misdemeanor stalking, but misdemeanor stalking must include an element not contained in felony stalking. Because the felony stalking statute incorporates the misdemeanor stalking statute by reference, the two offenses are not separate offenses under the Blockburger test. Misdemeanor stalking is a lesser included offense of felony stalking.[4] Therefore, the district court erred in its double jeopardy analysis.
The double jeopardy issue is more complex than simply applying the Blockburger test. That test applies "where the same act or *714 transaction constitutes a violation of two distinct statutory provisions." Blockburger v. United States, 284 U.S. 299, 304, 52 S.Ct. 180, 182, 76 L.Ed. 306, 309 (1932). The State contends that it is not seeking to punish Defendant twice for the same act or transaction. It contends that the acts that form the basis of this felony prosecution include, but are not identical to, the acts that were the basis of the misdemeanor conviction. It asserts that they are not identical because this prosecution is based upon the acts for which Defendant was convicted of misdemeanor stalking plus one additional act. Before addressing the State's argument, it is first necessary to construe Idaho Code § 18-7905 to determine whether the statute permits what the State is attempting to do.
3. Motion to dismiss based upon construction of Idaho Code § 18-7905(1). In connection with Defendant's motion to dismiss, he also argued the proper construction of Idaho Code § 18-7905(1). The district court summarized Defendant's argument as follows, "To state the issue another way, the question is whether, in the instant prosecution, the State is permitted [to] use acts of the Defendant that led to his prior misdemeanor stalking conviction to prove the element of a `course of conduct' sufficient to satisfy § 18-7905(1)." The court set out the State's argument as follows, "In response, the State argues that the defendant's previous conduct, for which he was convicted under § 18-7906 for stalking this same victim, can be included in the `course of conduct' alleged to satisfy the requirement of § 18-7905(1)that the person first violate § 18-7906." The court resolved the issue in favor of the State. It wrote, "The statue [sic] provides no chronological or other time-related requirements regarding the acts, nor does the statue [sic] specifically bar consideration in the instant case of acts that occurred prior to the conviction in Minidoka County." The district court erred in its interpretation of the statute.
The second amended information alleged that Defendant's conduct violated subsections (a), (b), and/or (e) of Idaho Code § 18-7905(1). The relevant portion of the statute is as follows:
A person commits the crime of stalking in the first degree if the person violates section 18-7906, Idaho Code, and:
(a) The actions constituting the offense are in violation of a temporary restraining order, protection order, no contact order or injunction, or any combination thereof; or
(b) The actions constituting the offense are in violation of a condition of probation or parole; or
...
(e) The defendant has been previously convicted of a crime under this section or section 18-7906, Idaho Code, or a substantially conforming foreign criminal violation within seven (7) years, notwithstanding the form of the judgment or withheld judgment; or
....
To commit the crime of felony stalking, the person must first violate section 18-7906 by engaging in a prohibited course of conduct. Idaho Code § 18-7906(1).[5] That course of conduct requires "repeated acts of nonconsensual contact involving the victim or a family or household member of the victim." Idaho Code § 18-7906(2)(a).
Section 18-7905(1)(a)violation of a no contact order. The second amended information alleges that Defendant engaged in a prohibited course of conduct, "where the actions constituting the offense are in violation of a no contact order." Under section 18-7905(1)(a), a person commits a felony if he or she "violates section 18-7906, Idaho Code, and ... [t]he actions constituting the offense *715 are in violation of a ... no contact order...." The "actions constituting the offense" would be the course of conduct that violated section 18-7906. Because a violation of section 18-7906 requires a "course of conduct" consisting of "repeated acts of nonconsensual contact" and it is the actions (plural) constituting the offense that must violate the no contact order, each of the acts constituting that course of conduct would have to violate the no contact order.
The specific acts for which Defendant was convicted of misdemeanor stalking are not shown in the record. From the facts reflected in the record and the arguments, it does not appear that Defendant engaged in repeated acts of nonconsensual contact that all violated the no contact order. It appears that the no contact order was issued in the case in which Defendant was convicted of misdemeanor stalking. A court can issue a no contact order when a person is charged with or convicted of violating section 18-7906. Idaho Code § 18-920(1). To violate that section, the person must engage in the prohibited course of conduct consisting of repeated acts of nonconsensual contact. The course of conduct necessary to constitute such violation must have preceded the issuance of the no contact order because the person must have been charged with or convicted of violating section 18-7906 before the no contact order was issued. Once the no contact order is issued, the person would then have to engage in a new course of prohibited conduct in order to commit a felony under section 18-7905(1)(a) because each of the acts constituting that course of conduct must violate the no contact order. The inference from the arguments is that Defendant committed one act, not a course of conduct consisting of repeated acts, that violated the no contact order. If that is correct, Defendant did not commit felony stalking under this subsection.
Section 18-7905(1)(b)violation of a condition of probation. The second amended information alleges that Defendant engaged in a prohibited course of conduct, "where the actions constituting this offense are violation of a condition of probation." Under 18-7905(1)(b), a person commits a felony if he or she "violates section 18-7906, Idaho Code, and ... [t]he actions constituting the offense are in violation of a condition of probation...." The "actions constituting the offense" would be the course of conduct consisting of repeated acts of nonconsensual contact that violated section 18-7906. Because it is the actions (plural) constituting the offense that must violate a condition of probation, each of the acts constituting that course of conduct would have to violate the condition.
The second amended information alleges that Defendant was sentenced for the misdemeanor stalking on August 23, 2007. The actions constituting the course of conduct that violated section 18-7906 would have to be repeated acts of nonconsensual contact that all violated a condition of probation. Because the conditions of probation could not have been imposed until Defendant was sentenced, the acts violating a condition of probation would have to have occurred after his sentencing. The second amended information alleges that such acts occurred between the Spring of 2006 and December 31, 2007. Obviously, acts occurring before Defendant was sentenced for misdemeanor stalking on August 23, 2007, could not have violated a condition of probation in that case. Again, the inference from the record and arguments is that there was only one act of nonconsensual contact that violated a condition of Defendant's probation. If that is correct, Defendant did not commit felony stalking under this subsection.
Section 18-7905(1)(e)prior conviction within seven years. The second amended information alleges that Defendant engaged in a prohibited course of conduct, "where the defendant had been previously convicted of stalking in the second degree within the last seven years." Under 18-7905(1)(e), a person commits a felony if he or she "violates section 18-7906, Idaho Code, and ... [t]he defendant has been previously convicted of a crime under ... section 18-7906, Idaho Code, ... within seven (7) years...." To have committed felony stalking under this subsection, Defendant would have to have engaged in a course of conduct that violated section 18-7906 and he would *716 have to have been previously convicted of misdemeanor stalking by earlier engaging in a course of conduct that violated section 18-7906. There would have to be two separate courses of conduct, each of which violates that section. Otherwise, he could not have engaged in a course of conduct that violated section 18-7906 and previously been convicted of misdemeanor stalking. As stated above, the inference from the record and arguments is that Defendant did not engage in a course of conduct that violated section 18-7906 after he was convicted of misdemeanor stalking. If that is correct, Defendant did not commit felony stalking under this subsection.
In summary, the district court did not err in failing to dismiss the felony stalking charge for lack of probable cause. By waiving his preliminary hearing, Defendant agreed that there was sufficient evidence to support a finding that there was probable cause to believe he committed that crime. The district court did not err in failing to dismiss the felony stalking charge on the ground that this prosecution violated the Double Jeopardy Clause. If Idaho Code § 18-7905(1)(a), (b), and (e) are correctly construed, there can be no double jeopardy violation. The district court did err in its interpretation of Idaho Code § 18-7905(1). As the felony stalking statute is written, acts necessary to prove a violation of section 18-7906 as an element of felony stalking must necessarily be different from the acts upon which Defendant's prior conviction for misdemeanor stalking was based. We will therefore vacate the judgment and remand this case for further proceedings that are consistent with this opinion.

III. CONCLUSION
We vacate the judgment and remand this case for further proceedings that are consistent with this opinion.
Justices BURDICK, J. JONES, W. JONES and HORTON concur.
NOTES
[1]  Because the charge of violating a no contact order was a misdemeanor, Defendant was not entitled to a preliminary hearing on that charge.
[2]  If the affidavit of probable cause was insufficient, a defendant could still challenge the issuance of an arrest warrant even though he or she later waived a preliminary hearing on the charged felony.
[3]  The district court only considered subsections (a), (b), and (e) of Idaho Code § 18-7905(1) because those were the subsections upon which the State based the charge of felony stalking.
[4]  "An offense will be deemed to be a lesser included offense of another, greater offense, if all the elements required to sustain a conviction of the lesser included offense are included within the elements needed to sustain a conviction of the greater offense." State v. McCormick, 100 Idaho 111, 114, 594 P.2d 149, 152 (1979).
[5]  The statute provides:

A person commits the crime of stalking in the second degree [a misdemeanor] if the person knowingly and maliciously:
(a) Engages in a course of conduct that seriously alarms, annoys or harasses the victim and is such as would cause a reasonable person substantial emotional distress; or
(b) Engages in a course of conduct such as would cause a reasonable person to be in fear of death or physical injury, or in fear of the death or physical injury of a family or household member.
