
15 P.3d 824 (2000)
135 Idaho 111
STATE of Idaho, Plaintiff-Respondent,
v.
Robert Louis WILHELM, Defendant-Appellant.
No. 24897.
Court of Appeals of Idaho.
August 4, 2000.
Rehearing Denied October 2, 2000.
Review Denied December 11, 2000.
*827 Gregory D. Horne, Coeur d'Alene, for appellant.
Hon. Alan G. Lance, Attorney General; Rebekah A. Cude, Deputy Attorney General, Boise, for respondent. Rebekah A. Cude argued.
LANSING, Judge.
Robert Louis Wilhelm brings this appeal from his judgment of conviction, entered upon a guilty plea, for trafficking in marijuana.

I.

BACKGROUND AND PROCEDURAL POSTURE
On August 29, 1995, Wilhelm was arrested while in possession of seventy-five pounds of marijuana. He was charged with trafficking in marijuana, Idaho Code § 37-2732B(a)(1)(C). At the time of his arrest on the state charge, Wilhelm was on supervised release for a federal criminal offense of possession of cocaine. Because of his Idaho arrest Wilhelm was found to be in violation of his federal supervised release and was ordered to serve a two-year term in federal prison.
During the pendency of the proceedings in the district court, Wilhelm filed a motion to dismiss this case, arguing that this trafficking charge subjected him to double jeopardy. He asserted that he had already served time in federal prison for the same conduct that was the basis of the state charge and that the Idaho State Tax Commission had seized $2,500 from him at the time of his arrest, which effectively served as punishment for the crime. These prior punishments, he argued, precluded further prosecution. The district court denied his motion to dismiss.
The State ultimately added to the charge against Wilhelm one count of conspiracy to traffic in cocaine, I.C. § 18-1701, and a persistent violator sentence enhancement under I.C. § 19-2514. Pursuant to a plea agreement, Wilhelm unconditionally pleaded guilty to trafficking in marijuana and to being a persistent violator. The State then dismissed the conspiracy charge. The trial court imposed a unified life sentence with a seven and one-half year minimum term and assessed a $50,000 fine.
In this appeal Wilhelm attacks his guilty plea on several bases, contends that the action should be dismissed for violation of his rights against double jeopardy, asserts that the amended indictment was jurisdictionally defective with respect to the persistent violator charge, and asserts that there were errors in sentencing.


*828 II.

ANALYSIS

A. Validity of the Guilty Plea
We address first Wilhelm's claims that his guilty plea was not knowingly, intelligently, and voluntarily entered. Wilhelm argues that he pleaded guilty in reliance upon certain misrepresentations made by the district court and that the district court failed to inquire properly into his mental competence to enter the plea. Wilhelm did not, however, move to set aside his guilty plea or otherwise raise these arguments to the district court.[1]
In order to be valid, a guilty plea must be entered knowingly, voluntarily, and intelligently. State v. Acevedo, 131 Idaho 513, 515, 960 P.2d 196, 198 (Ct.App.1998); State v. Rose, 122 Idaho 555, 558, 835 P.2d 1366, 1369 (Ct.App.1992). However, a challenge to the voluntariness of a plea may not be raised for the first time on appeal unless it presents a question of fundamental error. State v. Harris, 127 Idaho 376, 379, 900 P.2d 1387, 1390 (Ct.App.1995).
A contention that the defendant lacked the mental capacity to enter a guilty plea is an issue that must be raised to the trial court. "[W]here the competency question has not been raised, the trial judge has no duty to independently inquire as to the competency of the defendant." State v. Fuchs, 100 Idaho 341, 346, 597 P.2d 227, 232 (1979). Wilhelm did not seek a judicial determination of his competence before pleading guilty, nor move to withdraw his guilty plea, nor otherwise formally place his mental competence to plead guilty at issue. The Fuchs decision suggests, however, that even without a formal motion from the defendant, the trial court may have an obligation to conduct a hearing on a defendant's competence to plead guilty if "a question of competency lurks in the background." Id. The Fuchs court referred to the holding of the Ninth Circuit Court of Appeals in Sailer v. Gunn, 548 F.2d 271 (9th Cir.1977), that to satisfy due process, a hearing on a defendant's competence to plead guilty is necessary "if the trial judge entertains or should have reasonably entertained a good-faith doubt as to the competence of the defendant." Fuchs, 100 Idaho at 346-47, 597 P.2d at 232-233. Wilhelm argues that the district court had reason to doubt his competence because at the plea hearing the court was informed that Wilhelm was under psychiatric care for manic depression and attention deficit disorder.
We disagree that the information given to the district court was sufficient to trigger an obligation for the court to order a mental examination of Wilhelm. The district court made a brief inquiry to determine whether Wilhelm's mental health problems or the medication that he was taking impaired his ability to think clearly and to knowingly enter a plea. Nothing which Wilhelm or his counsel said at the hearing gave a reason to believe that Wilhelm was incompetent. Throughout the hearing, Wilhelm answered the court's questions appropriately; and he asked intelligent, pointed questions about his potential sentence, the effect of the persistent violator enhancement, and the prospect of credit for time served. We find nothing in the record that should have caused the trial court to entertain a good faith doubt about Wilhelm's competence to plead guilty. Therefore, we reject Wilhelm's contention that his guilty plea should be set aside on appeal because the trial court did not sua sponte order a hearing to determine Wilhelm's competence.
Wilhelm's next contention, that he was misled into pleading guilty by misrepresentations of the trial court, presents an issue of fundamental error. "[C]onduct by a trial court inducing a defendant to plead guilty in reliance upon promises that are later dishonored by the court would be fundamental error." Harris, 127 Idaho at 379, 900 P.2d at 1390. Therefore, we will examine this claim despite Wilhelm's failure to raise it below.
Wilhelm first asserts that the district court misled him by representing that if he pleaded guilty his determinate sentence would be five years rather than the seven and one-half years actually imposed and that the district *829 court represented that Wilhelm would be given credit for twenty months that he served in a federal prison. We find, however, that the hearing transcripts upon which Wilhelm relies for this claim do not support his position. These transcripts show that at his arraignment, the district court correctly informed Wilhelm that the mandatory minimum sentence, prescribed by statute, for the offense of trafficking in marijuana was five years. Wilhelm was also informed that though the court could not impose a lesser sentence, it had the discretion "to go beyond that to the maximum." This colloquy could not be reasonably interpreted as a promise by the district court that a particular sentence would be imposed upon Wilhelm. Next, the transcript of the hearing in which credit for time served in the federal prison was discussed shows that it was defense counsel, not the court, who speculated that Wilhelm would receive credit on his state sentence for his federal imprisonment. The district court did not adopt this position nor make any promise in that regard. Thus, Wilhelm's assertion that he was induced to plead guilty by misrepresentations of the trial court are without support in the record.
Wilhelm also contends that the district court assured him that no information that he revealed in the course of debriefings with law enforcement personnel would be utilized against him and then broke this promise by considering such information at sentencing. Once again, the record disproves Wilhelm's contention. Wilhelm met with law enforcement officials on two separate occasions. The first meeting took place in 1995, prior to his incarceration in federal prison. Details from this meeting were included in the presentence investigation report (PSI), which the court considered at sentencing. The second meeting occurred in the summer of 1997. According to the record before this Court, Wilhelm met with narcotics officers pursuant to a "free talk" agreement with the prosecutor. Under this agreement, Wilhelm voluntarily met with law enforcement personnel and the State agreed not to use information divulged during the meeting in criminal proceedings against Wilhelm. This 1997 "free talk" debriefing was the subject of the district court's assurances that the information he divulged would not be used against him. The record reflects that the only information about Wilhelm's disclosures to police that was considered by the district court at sentencing derived from the 1995 meeting, not Wilhelm's 1997 meeting with law enforcement. Hence, the court did not violate its assurances to Wilhelm.

B. Double Jeopardy
Wilhelm next contends that the district court erred by denying his motion to dismiss the marijuana charge on the ground that the prosecution violates the Double Jeopardy Clause of the Fifth Amendment to the United States Constitution. He argues that he has already been punished for the marijuana offense because the Idaho State Tax Commission seized $2,500 from him pursuant to the Idaho Illegal Drug Stamp Tax Act, I.C. § 63-4208. This seizure, according to Wilhelm, constituted punishment for double jeopardy purposes, and therefore he cannot be punished again for the same offense.[2]
We will not address the merits of this issue because it was waived by Wilhelm's guilty plea. The entry of a valid, unconditional guilty plea constitutes a waiver of all non-jurisdictional defects. State v. Kelchner, 130 Idaho 37, 39, 936 P.2d 680, 682 (1997); State v. Book, 127 Idaho 352, 354, 900 P.2d 1363, 1365 (1995). Although non-jurisdictional defects can be preserved for appellate review by entering a conditional guilty plea pursuant to I.C.R. 11(a)(2), Kelchner, supra; State v. Garcia, 126 Idaho 836, 837, 892 P.2d 903, 904 (Ct.App.1995); State v. Magill, 119 Idaho 218, 219, 804 P.2d 947, 948 (Ct.App. 1991), Wilhelm's plea was not so conditioned.[3]*830 Absent a Rule 11(a)(2) agreement, a defendant may not retain the benefits of a plea bargain in the form of concessions from the State without waiving any double jeopardy objection to the resulting conviction or sentences. State v. Armstrong, 127 Idaho 666, 668, 904 P.2d 578, 580 (Ct.App.1995). Accordingly, Wilhelm's double jeopardy argument has not been preserved for appellate review.

C. Waiver of the Alleged Deficiencies in the Persistent Violator Charge
Wilhelm also claims that the persistent violator charge in the amended indictment was fatally defective because one of the predicate felonies was in fact a misdemeanor. He argues that this error in the indictment is a jurisdictional defect and therefore was not waived by the entry of a guilty plea or by his failure to raise the issue below.
An indictment must contain "[a] statement of the acts constituting the offense in ordinary and concise language, and in such manner as to enable a person of common understanding to know what is intended." I.C. § 19-1409(2). A "jurisdictional defect" exists when the facts alleged in the indictment are not made criminal by statute or where there is a failure to state facts essential to establish the offense charged. State v. Grady, 89 Idaho 204, 404 P.2d 347 (1965); Hays v. State, 113 Idaho 736, 739, 747 P.2d 758, 761 (Ct.App.1987). Although a jurisdictional defect is not waived by a guilty plea, indictments that are tardily challenged are liberally construed in favor of validity. State v. Robran, 119 Idaho 285, 287, 805 P.2d 491, 493 (Ct.App.1991). Wilhelm contends that his indictment was jurisdictionally defective with respect to the persistent violator allegation because it does not allege two or more prior felony convictions as required for persistent violator status under I.C. § 19-2514.[4]
We disagree. In the third amended indictment, Part II alleged that Wilhelm "had been previously convicted of at least two (2) separate felony offenses" (emphasis added) and should be considered a persistent violator under I.C. § 19-2514. The indictment further alleged that:
[D]efendant's previous convictions consist of the following felony offenses:
1) On or about the 18th day of January, 1996, under the name of Robert Louis Wilhelm, the defendant was found in violation of the judgment for Possession of a Controlled Substance (Cocaine), in the Eastern District of Washington, United States District Court, by U.S. District Judge Justin Quackenbush, in case number 2:88CR00221-001 which was entered on October 3, 1988;
2) On or about the 28th day of December, 1984, under the name of Robert Louis Wilhelm, the defendant was convicted of the felony of Assault on a Federal Officer, in the Eastern District of Washington, United States District Court, by U.S. District Judge Justin Quackenbush, in case number CR84-193-1.
(Emphasis added.) Thus, the indictment alleges that Wilhelm had previously been convicted of two felonies, both in federal courts. Under a liberal construction, which is applied because Wilhelm did not raise this alleged defect in a timely fashion below, the indictment states sufficient facts to support the allegation that he was a persistent violator, meeting the jurisdictional requirements. Whether the State could have met its burden of proving the requisite elements is another question, and is the true crux of Wilhelm's argument on appeal. However, a valid guilty plea relieves the government of its burden of proof. See, e.g., State v. Tipton, 99 Idaho 670, 673, 587 P.2d 305, 308 (1978) ("A valid guilty plea is a judicial admission of all facts *831 charged by the indictment or information."); Hays, 113 Idaho at 740, 747 P.2d at 762. Wilhelm may not return the burden of proof to the State after admitting the persistent violator allegation in his guilty plea. Therefore, the issue as to whether one of the federal offenses alleged in the indictment was a misdemeanor is waived. See Kelchner, 130 Idaho at 39, 936 P.2d at 682.

D. Sentencing
Wilhelm raises two challenges to his sentence. First, he argues that the sentence and fine are excessive and, second, he argues that the sentencing court failed to give him credit to which he was entitled for time served in federal prison.

1. Reasonableness of the sentence
For Wilhelm's crime, with the sentence enhancement, the district court imposed a unified life sentence with a seven and one-half year determinate term of incarceration and a $50,000 fine. Wilhelm asserts that the sentence is excessive, particularly in light of evidence presented at the sentencing hearing that Wilhelm suffers from attention deficit disorder and bipolar affective disorder.
Our review of the reasonableness of a sentence is based on an abuse of discretion standard. State v. Wolfe, 99 Idaho 382, 582 P.2d 728 (1978); State v. Morris, 131 Idaho 562, 961 P.2d 653 (Ct.App.1998). In conducting our review, we focus on the probable length of confinement, which is the determinate period of incarceration imposed by the sentencing judge. State v. Sanchez, 115 Idaho 776, 777, 769 P.2d 1148, 1149 (Ct.App. 1989). A clear abuse of discretion is shown only if, considering the sentencing objective of protecting society and any of the related goals of deterrence, rehabilitation, or retribution applicable to a given case, the sentence imposed is excessive under any reasonable view of the facts. State v. Charboneau, 124 Idaho 497, 500, 861 P.2d 67, 70 (1993); State v. Toohill, 103 Idaho 565, 568, 650 P.2d 707, 710 (Ct.App.1982). When evaluating a sentence, we consider both the nature of the offense and the character of the offender. State v. Hernandez, 121 Idaho 114, 117-18, 822 P.2d 1011, 1014-15 (Ct.App.1991); State v. Lopez, 106 Idaho 447, 449-51, 680 P.2d 869, 871-73 (Ct.App.1984).
The maximum possible penalty for trafficking in marijuana is a fifteen-year sentence and a $50,000 fine, and the statutory minimum fixed term is five years. I.C. § 37-2732B(a)(1)(D). The maximum term of imprisonment under the persistent violator statute is a determinate life sentence. I.C. § 19-2514. Wilhelm therefore could have received a much lengthier determinate term under the aforementioned statutes.
Wilhelm had a criminal record of nine misdemeanor convictions, including convictions for malicious injury to property, obstructing an officer, and bail jumping. He also previously had been imprisoned on convictions for distribution of cocaine and assault on a federal officer. The latter conviction arose after Wilhelm tried to run down a Drug Enforcement Administration agent with his car at the Spokane airport where Wilhelm had been observed picking up a shipment of cocaine. In the present case, in addition to the marijuana trafficking charge, Wilhelm had been charged with conspiracy to commit trafficking in cocaine, but the conspiracy charge was dismissed pursuant to the plea agreement. There was evidence in the presentence report that Wilhelm had a history of trafficking in large quantities of marijuana and cocaine, and although Wilhelm disputed some of the details at the sentencing hearing, he admitted that he was a large-scale drug dealer. The PSI revealed that Wilhelm had substantial assets, including a number of pieces of real property and a business. Some of these assets appear to have been purchased with the ill-gotten gain from Wilhelm's drug trafficking activities. Wilhelm refused to reveal additional financial information, stating that he intended to ensure that his assets went to his family rather than to the State.
The sentencing court considered Wilhelm's mental condition and psychological evaluations, along with his potential for rehabilitation and treatment, but also took into account Wilhelm's history of failing to take the medications that made him less volatile. Additionally, the court weighed the defendant's past criminal history, the large volume of drugs that were involved in the case, and the *832 general societal needs for retribution and deterrence in arriving at the prison term.
Based upon the seriousness of this offense and the foregoing evidence of Wilhelm's character and the danger of reoffense that he presents, we conclude that the sentence and fine imposed by the district court are not an abuse of the district court's sentencing discretion.

2. Credit for time served in federal prison.
As his final issue before this Court, Wilhelm argues that he should have received credit for time served in federal prison. Idaho Code § 18-309 governs credit for prejudgment incarceration. It provides in part:
In computing the term of imprisonment, the person against whom the judgment was entered shall receive credit in the judgment for any period of incarceration prior to the entry of judgment, if such incarceration was for the offense or an included offense for which the judgment was entered.
Whether the sentencing court correctly applied I.C. § 18-309 to the facts of this case is a question of law over which this court will exercise free review. State v. Jakoski, 132 Idaho 67, 68, 966 P.2d 663, 664 (Ct.App.1998); State v. Dorr, 120 Idaho 441, 443, 816 P.2d 998, 1000 (Ct.App.1991).
Federal supervised release is governed by 18 U.S.C. § 3583.[5] A term of federal supervised release is part of the original sentence received, 18 U.S.C. § 3583(a). Thus, Wilhelm's supervised release resulted from his 1988 federal conviction for possession of cocaine with the intent to distribute. Under 18 U.S.C. § 3583(d) and (g), Wilhelm's arrest for possession of marijuana in the instant case amounted to a violation of the conditions of his supervised release and required revocation. The federal district court then imposed a twenty-four month term of imprisonment pursuant to § 3583(e)(3).
Wilhelm's argument that he should receive credit on his state sentence for the twenty months that he served in a federal prison after being found in violation of his supervised release is incorrect. As we have previously stated, entitlement to credit under I.C. § 18-309 depends upon whether "the defendant's incarceration [was] upon the offense for which he was sentenced." State v. Hale, 116 Idaho 763, 765, 779 P.2d 438, 440 (Ct.App.1989). Federal supervised release is similar to the probation and parole system in place in Idaho. When a defendant is arrested for violating the conditions of his probation or parole, the ensuing incarceration is attributable to the underlying offense, and the defendant receives credit on his sentence for the underlying offense. State v. Buys, 129 Idaho 122, 922 P.2d 419 (Ct.App.1996); State v. Peterson, 121 Idaho 775, 828 P.2d 338 (Ct.App.1992). See also State v. Brashier, 127 Idaho 730, 738, 905 P.2d 1039, 1047 (Ct.App.1995). Similarly, when a defendant is in violation of his federal supervised release, the resulting imprisonment is attributable to the underlying federal offense. See 18 U.S.C. § 3583(a), (e). Here, Wilhelm's *833 confinement in a federal prison was for his federal offense. Indeed, the federal court had no authority, and did not purport, to imprison Wilhelm for the state charge at issue in this case. Hence, while the investigation into Wilhelm's possession of marijuana and the subsequent state charges might have provided evidence of a violation of the conditions of his federally supervised release, the twenty months of federal incarceration is not attributable to the state offense. Therefore, the district court properly denied Wilhelm credit for his incarceration in federal prison.

III.

CONCLUSION
Wilhelm's challenges to the validity of his guilty plea and the sufficiency of the amended indictment are without merit, and his claim that this prosecution violates the constitutional prohibition against double jeopardy was not preserved for appellate review. The sentence imposed by the district court is reasonable, and Wilhelm is not entitled to credit for time served in a federal correctional institution. Accordingly, the judgment of conviction and sentence are affirmed.
Chief Judge PERRY and Judge SCHWARTZMAN concur.
NOTES
[1]  Wilhelm's attorney on appeal is not the attorney who represented him in the district court.
[2]  In his appellant's brief, Wilhelm argued that the federal "conviction" for violating the terms of his supervised release by committing this marijuana offense, and the attendant imprisonment, also constituted a prosecution and punishment for the same act and implicated the Double Jeopardy Clause. However, at oral argument, counsel for Wilhelm conceded that this argument could not be sustained under applicable law.
[3]  Idaho Criminal Rule 11(a)(2) provides:

With the approval of the court and the consent of the prosecuting attorney, a defendant may enter a conditional plea of guilty reserving in writing the right, on appeal from the judgment, to review any specified adverse ruling. If the defendant prevails on appeal, the defendant shall be allowed to withdraw defendant's plea.
[4]  Idaho Code § 19-2514 states:

Any person convicted for the third time of the commission of a felony, whether the previous convictions were had within the state of Idaho or were had outside the state of Idaho, shall be considered a persistent violator of law, and on such third conviction shall be sentenced to a term in the custody of the state board of correction which term shall be for not less than five (5) years and said term may extend to life.
[5]  In pertinent part, 18 U.S.C. § 3583 provides:

(a) In general.The court, in imposing a sentence to a term of imprisonment for a felony or a misdemeanor, may include as a part of the sentence a requirement that the defendant be placed on a term of supervised release after imprisonment....
....
(d) Conditions of supervised release.The court shall order, as an explicit condition of supervised release, that the defendant not commit another Federal, State, or local crime during the term of supervision and that the defendant not unlawfully possess a controlled substance....
(e) Modification of conditions or revocation. The court may....
....
(3) revoke a term of supervised release, and require the defendant to serve in prison all or part of the term of supervised release authorized by statute for the offense that resulted in such term of supervised release without credit for time previously served on postrelease supervision, if the court, pursuant to the Federal Rules of Criminal Procedure applicable to revocation of probation or supervised release, finds by a preponderance of the evidence that the defendant violated a condition of supervised release....
(g) Mandatory revocation of possession of controlled substance.... If the defendant(1) possesses a controlled substance in violation of the [conditions of supervised release] ... the court shall revoke the term of supervised release and require the defendant to serve a term of imprisonment...."
