
264 P.3d 935 (2011)
STATE of Idaho, Plaintiff-Respondent,
v.
Dean Clay MILLER, Jr., Defendant-Appellant.
No. 38031.
Supreme Court of Idaho, Boise, August 2001 Term.
November 18, 2011.
*937 Molly Huskey, State Appellate Public Defender, Boise, for appellant. Sarah E. Tompkins, Deputy Appellate Public Defender argued.
Hon. Lawrence G. Wasden, Idaho Attorney General, Boise, for respondent. Mark W. Olson, Deputy Attorney General argued.
BURDICK, Chief Justice.
This appeal arises from Dean Clay Miller, Jr.'s conviction for burglary, assault with intent to commit robbery, possession of methamphetamine, and being a persistent violator. This case is primarily concerned with two issues: (1) whether a persistent violator enhancement must be alleged in the information to give a court subject matter jurisdiction; and (2) whether the defendant's sentence *938 was excessive and constituted an abuse of discretion.
Miller pled guilty to possession of a controlled substance, burglary, and assault with the intent to commit robbery. He also pled guilty to being a persistent violator. Miller argues that the district court lacked subject matter jurisdiction because the State did not allege the persistent violator enhancement in the information. He also argues that if the court did have subject matter jurisdiction, the sentence was excessive in light of his mental health condition and other mitigating factors. We hold that the district court had subject matter jurisdiction to sentence Miller. We also hold that the district court acted consistent with I.C. § 19-2523 and I.C § 19-2521 and did not abuse its discretion when sentencing Miller.

I. FACTUAL AND PROCEDURAL BACKGROUND
Miller was arrested on September 24, 2007, in Pocatello, Idaho, for assault, burglary with the intent to commit robbery, and possession of methamphetamine. Miller had been on a three-week methamphetamine binge, and said he was fleeing pursuers. Miller claimed he had been running a long time and entered the victims' home in an attempt to escape. The home belonged to a family consisting of the parents and three children, one of whom was an infant. He entered their home through an unlocked side door in the garage, found a shotgun, and entered the bedroom where the parents were sleeping with the baby. Also in the home were the victims' two other children. The parents awoke, finding Miller there, wearing a mask and gloves and pointing the shotgun at them. He told them he was going to wait until morning when the banks opened, and force them to withdraw all of their money. At one point, Miller looked out the window, and the father was able to strike Miller in the head with the shotgun. This distracted Miller long enough for the mother and baby to escape. The father also ran outside and told his neighbor to get his guns and come help. His neighbor grabbed his .45 pistol, and the two approached the house, where they noticed that Miller had entered the garage. The neighbor entered and confronted Miller, and there was a short standoff. The father told his neighbor not to shoot Miller because the shotgun was unloaded. Miller dropped the shotgun and then held a knife up to his throat and wrist, threatening to kill himself. Shortly thereafter, the police arrived and subdued Miller. Only then was the father able to reenter his home and get to his other two children. When the police searched Miller they found methamphetamine in his pocket.
The original charges filed against Miller were for burglary, kidnapping in the first degree, assault with intent to commit robbery accompanied by a firearms enhancement, and possession of a controlled substance. The State was granted leave to amend the information to include a persistent violator enhancement, though no amendment was ever filed. However, the state did file a Notice to Defendant to Seek Persistent Violator Enhancement ("Notice to Defendant"). Miller subsequently pled guilty to the burglary, assault and possession charges, along with being a persistent violator. The other charges were dismissed. When Miller pled guilty to being a persistent violator, the district court and the prosecutor referred to part III of the Information. There was never a part III filed, but presumably they were referring to the Notice to Defendant.
Miller has a history of psychological problems, so the court ordered a psychological evaluation pursuant to I.C. § 19-2524. That evaluation stated that Miller suffered from anxiety and depression, and that he met the criteria for "Major Depression and Personality Disorder Not Otherwise Specified with Antisocial Traits and Substance Abuse." That evaluation also noted that Miller approached the psychological tests "in an effort to emphasize his psychological problems." The symptoms of these disorders had been compounded by his drug use, but he was prescribed numerous psychotropic medications throughout his life.
Based on his admission that he was a persistent violator, Miller received enhanced sentences consisting of concurrent indeterminate life terms, with twenty-eight years fixed, for burglary and assault with intent to *939 commit robbery. Miller was sentenced to a concurrent seven year fixed term for possession of methamphetamine.
Miller appealed on two grounds: first, that the district court did not have jurisdiction to sentence him as a persistent violator because the enhancement was not included in the information; and second, that the sentence was excessive and constituted an abuse of discretion. The Court of Appeals heard the case and issued a decision on June 14, 2010. It held that the district court had jurisdiction to sentence Miller as a persistent violator but that the sentence for the burglary and assault charges was excessive and constituted an abuse of discretion. It upheld the sentence of seven years for the possession charge and reduced his sentence to a term of fifteen years determinate with indeterminate life for the burglary and assault charges. This Court granted the State's petition for review.

II. STANDARD OF REVIEW
When reviewing a decision by the Court of Appeals, this Court directly reviews the decision of the district court, while giving serious consideration to the intermediate appellate decision. State v. Arthur, 145 Idaho 219, 221-22, 177 P.3d 966, 968-69 (2008).
Whether a court lacks jurisdiction is a question of law that can be raised at any time and over which appellate courts exercise free review. State v. Jones, 140 Idaho 755, 757, 101 P.3d 699, 701 (2004). Whether an information conforms to law is also a matter of free review. Id.

III. ANALYSIS

A. The district court had subject matter jurisdiction to sentence Miller as a persistent violator where the information did not include the enhancement.
Miller argues that the district court lacked subject matter jurisdiction to sentence him as a persistent violator because the enhancement was not included in the information. Subject matter jurisdiction in a criminal case is conferred by the filing of an "information, indictment, or complaint alleging an offense was committed in the State of Idaho." State v. Rogers, 140 Idaho 223, 227, 91 P.3d 1127, 1131 (2004); Idaho Const. art. I, § 8. A defect in subject matter jurisdiction can be raised at any time, including for the first time on appeal. Jones, 140 Idaho at 758, 101 P.3d at 702; I.R.C.P. 12(b)(2). However, defects that are "tardily challenged are liberally construed in favor of validity." Jones, 140 Idaho at 759, 101 P.3d at 703. As a result, when an information is challenged for the first time on appeal, the validity of the information will be upheld "unless it is so defective that it does not, by any fair or reasonable construction, charge an offense for which the defendant is convicted." Id. (quoting State v. Cahoon, 116 Idaho 399, 400, 775 P.2d 1241, 1242 (1989)). This statement reflects the policy that "[c]onvictions are no longer reversed because of minor and technical deficiencies" that cause no harm. Cahoon, 116 Idaho at 400, 775 P.2d at 1242 (quoting United States v. Pheaster, 544 F.2d 353, 360 (9th Cir.1976)).
An information is valid if it "first, contains the elements of the offense charged and fairly informs a defendant of the charge against which he must defend, and, second, enables him to plead an acquittal or conviction in bar of future prosecutions for the same offense." Hamling v. United States, 418 U.S. 87, 117, 94 S.Ct. 2887, 2907, 41 L.Ed.2d 590, 620 (1974). Put more simply, the defendant has a right "to be informed of the exact charge against him," and "to know for what specific offense" he is being put on trial. State v. Petty, 73 Idaho 136, 138, 248 P.2d 218, 219 (1952). This not only allows a defendant to mount a proper defense, but enables him to avoid being re-prosecuted in the future for the same offense.
The persistent violator enhancement is not a separate offense; rather, it "merely provides for greater punishment . . . than that which might have been inflicted had there not been two prior convictions." Clark v. State, 92 Idaho 827, 833, 452 P.2d 54, 60 (1969). While the prior convictions upon which the enhancement is based must be proved beyond a reasonable doubt, State v. Stover, 140 Idaho 927, 931, 104 P.3d 969, 973 (2005); State v. Salazar, 95 Idaho 305, 307, *940 507 P.2d 1137, 1139 (1973), they do not need to be alleged in the information to confer jurisdiction.
This Court has held that "[w]here it is sought to punish a defendant in a felony case as a persistent violator of law, the former convictions relied on must be alleged in the indictment or information." State v. Lovejoy, 60 Idaho 632, 637, 95 P.2d 132, 134 (1939). We explained that the defendant needs to "know exactly what he is accused of and prepare his defense." Id. Although Lovejoy stated that the enhancement must be alleged in the information, this case was based upon a due process challenge rather than jurisdiction. Nothing in the statute requires the prior convictions to be alleged in the information. I.C. § 19-2514. The statute merely states that "[a]ny person convicted for the third time of the commission of a felony . . . shall be considered a persistent violator of law." Id. Furthermore, because it is not technically an offense, it is not subject to the provision in the Idaho Constitution that states "[n]o person shall be held to answer for any felony or criminal offense of any grade, unless on presentment or indictment of a grand jury or on information of the public prosecutor." Idaho Const. art. I, § 8 (emphasis added). Accordingly, an enhancement does not need to be alleged in the information to give a court subject matter jurisdiction.
While few courts have considered the issue, the North Carolina Supreme Court held that the indictment or information does not need to specify the prior felonies upon which an enhancement is based. State v. Cheek, 339 N.C. 725, 453 S.E.2d 862, 864 (1995). Rather, the state need only give "notice of the felonies on which it is relying to support the habitual felon charge." Id. Including the date the prior felonies were committed, the state where it happened and the dates of conviction was sufficient. Id. This fulfilled the requirements of North Carolina's statute and also provided adequate notice to the defendant. Id. However, it should be noted that the North Carolina statute required the habitual offender charge to be alleged in an indictment. Thus, the dates of commission and conviction, as well as the state where the offenses occurred, had to be alleged in the indictment itself to comply with the law. See id. Nevertheless, the North Carolina court framed the issue as one of notice, not of grounds for jurisdiction. Simply giving notice of the enhancement will allow defendants to mount a proper defense.
Idaho Criminal Rule 7(c) states that "[i]n all cases wherein an extended term of imprisonment is sought as the result of a prior conviction or convictions, the indictment or information shall set forth the facts on which the extended term of imprisonment is sought." However, this is not an issue of subject matter jurisdiction but one of notice, and notice can be given in other forms. Thus, the question in this case becomes whether the notice was sufficient. Notice is a matter of due process, and must be raised before trial or it is waived. State v. Jones, 140 Idaho 755, 760, 101 P.3d 699, 704 (2004). Miller failed to raise this issue below, so this Court cannot address it on appeal. Miller entered a plea of guilty that waived all non-jurisdictional defects. State v. Clements, 148 Idaho 82, 86, 218 P.3d 1143, 1147 (2009) (noting that a valid guilty plea waives all non-jurisdictional defects). Additionally, if Miller had an objection to the sufficiency of the notice, he should have made that objection before the district court.
Miller was given more than three months' notice that the State was seeking the persistent violator enhancement. The State filed its Notice to Defendant on January 28, 2008. Miller's plea hearing was held on May 12, 2008. Over three months is sufficient notice. See State v. Severson, 147 Idaho 694, 709-10, 215 P.3d 414, 429-30 (2009) (which allowed an amendment that did not charge a new offense, did not take the defendant by surprise and gave adequate time to prepare). This case is not to be considered the best practice for purposes of notice to a defendant of a persistent violator enhancement. The better and more dependable practice is a clear statement of what felonies are being relied upon for the enhancement, along with: the title of the offenses; the dates of conviction; and the state where the felonies occurred. In taking a plea it is better practice for the judge taking the plea to verify those factual *941 assertions prior to accepting the plea. Although it is problematic that the Notice to Defendant did not specify which felonies were being relied on for the enhancement, we hold that the district court had subject matter jurisdiction to sentence Miller as a persistent violator.

B. The district court did not abuse its discretion when it sentenced Miller to concurrent sentences of life, with twenty-eight years determinate, for burglary and assault with intent to commit robbery with a persistent violator enhancement, as well as seven years determinate for possession of a controlled substance.

1. Standard of Review

Miller argues that the sentence the trial court imposed was excessive. "Where the sentence imposed by a trial court is within statutory limits, the appellant bears the burden of demonstrating that it is a clear abuse of discretion." State v. Windom, 150 Idaho 873, 875, 253 P.3d 310, 312 (2011) (quoting State v. Stevens, 146 Idaho 139, 148, 191 P.3d 217, 226 (2008)). When evaluating whether a sentence is excessive, this Court considers the entire length of the sentence under an abuse of discretion standard. Stevens, 146 Idaho at 148, 191 P.3d at 226. When considering whether the trial court abused its discretion, this Court considers: (1) whether the trial court correctly perceived the issue as one of discretion; (2) whether the trial court acted within the boundaries of its discretion and consistently with the legal standards applicable; and (3) whether the trial court reached its decision by an exercise of reason. Id. at 143, 191 P.3d at 221. "In deference to the trial judge, this Court will not substitute its view of a reasonable sentence where reasonable minds might differ." Id. at 148-49, 191 P.3d. at 226-27.

2. Analysis

From the sentencing hearing, it is apparent that the district court appropriately perceived sentencing as a matter of discretion, and this is not refuted by Miller. The district court correctly stated that it was within its discretion to impose probation or a prison sentence depending on the circumstances as outlined in I.C. § 19-2521. Also, it is apparent from the record that the district court appropriately perceived the limits of its discretion and sentenced the defendant within those boundaries. The district court sentenced the defendant to twenty-eight years determinate and indeterminate life for the burglary and assault charges. This is within the statutory limits for those charges with a persistent violator enhancement, which is five years to life. I.C. § 19-2514. Likewise, the sentences imposed for the other charges were within statutory limits, and Miller does not contest this. The record also demonstrates that the district court applied the correct legal principles with regard to the policies behind imposing a prison sentence. The court recognized that it was to look at protection of society, deterrence, rehabilitation, and retribution in imposing its sentence. However, Miller argues that the district court did not exercise reason in its discretion because it did not appropriately factor in his mental condition or the mitigating circumstances surrounding his case.
When a trial court exercises its discretion in sentencing, "the most fundamental requirement is reasonableness." State v. Hooper, 119 Idaho 606, 608, 809 P.2d 467, 469 (1991). A sentence is reasonable if it appears necessary to accomplish the primary objective of protecting society and to achieve any or all of the related goals of deterrence, rehabilitation or retribution. State v. Lundquist, 134 Idaho 831, 836, 11 P.3d 27, 32 (2000). When reviewing the reasonableness of a sentence this Court will make an independent examination of the record, "having regard to the nature of the offense, the character of the offender and the protection of the public interest." State v. Shideler, 103 Idaho 593, 594, 651 P.2d 527, 528 (1982). When considering the sentence to be imposed, if the defendant's mental condition is a significant issue, the sentencing judge must also weigh that mental condition as a sentencing consideration. I.C. § 19-2523; State v. Moore, 126 Idaho 208, 211, 880 P.2d 238, 241 (1994).


*942 a. Nature of the Offense

The nature of the offense is considered primarily to determine whether the severity of the sentence is warranted. See Shideler, 103 Idaho at 594, 651 P.2d at 528. When looking at the nature of the offense, it is not just the actual harm that is considered but the threatened harm of the conduct as well. Id. The nature of the offense and protection of the public interest go hand-in-hand because the level of protection required corresponds to the severity of the crime. The nature of the offense and protection of the public interest are weighed against the character of the offender to determine a reasonable sentence. See id.
Miller's crimes are serious. He entered a home in the middle of the night. Upon entering, he discovered a shotgun and used it to threaten the occupants of the house, where children, including an infant, were present. He told them he was going to wait until the banks opened and force them to withdraw all of their money. While the shotgun was not loaded and everyone walked away from the incident uninjured, the severity of these crimes warrants a prison sentence.
Possession of methamphetamine, although less egregious, is still a serious crime. Miller has been convicted of three drug-related offenses prior to this one. Also, his previous two felonies were connected to his drug abuse. Since Miller's criminal tendencies and his drug abuse seem to coincide, a severe sentence with regard to the possession of methamphetamine is also reasonable.

b. Protection of the Public Interest
Protection of the public interest is primarily related to the sentencing goal of protecting society from the offender in the future, and to a lesser extent the deterrent value of punishment on the rest of society. State v. Stormoen, 103 Idaho 83, 85, 645 P.2d 317, 319 (1982). In Stormoen, this Court stated that "the public interest lies not only in being safe from future crimes, but to some extent in seeing that punishment is imposed for crimes committed." Id. Miller has shown that he is prone to committing crimes as a result of his drug habit, thereby posing a threat to society. His mental health evaluation stated that he posed a "low to moderate risk" of harming himself or others. However, the evaluation stated that a return to drug abuse could lead to an increased risk of harming himself or others. Under these facts a substantial prison term is reasonable to protect society at large. Additionally, a prison term will act as a deterrent for similar behavior.

c. Miller's Character
Miller argues that his sentence is excessive and that his family support, history of substance abuse, and the circumstances of his prior convictions should serve as mitigating factors. Even where the district court appropriately understands its discretion and sentences a defendant according to the applicable legal principles, an unreasonably excessive sentence can still be an abuse of discretion, and this Court can reduce the sentence. For example, in Shideler, the defendant robbed a bank at gunpoint, stole $22,000, and fired two shotgun blasts at a pursuing vehicle. 103 Idaho at 594, 651 P.2d at 528. Shideler was sentenced to a twenty year indeterminate term, which was within statutory limits. Id. at 593, 651 P.2d at 527. However, this Court reduced that sentence to twelve years because, despite the seriousness of the offense, twenty years was unreasonable considering Shideler's character. Id. at 595, 651 P.2d at 529. He had not been involved in criminal activity prior to the robbery. Id. He had been in poor mental and physical health prior to the offense, and he had been abusing prescription medications. Id. While released on bond, he showed marked improvement and expressed remorse for his actions. Id. He also had the support of his family. Id. Despite its technical sufficiency, a twenty year sentence was unreasonable in light of these factors.
Here, Miller argues that his substance abuse should have been considered as a mitigating factor. Miller has an extensive history of drug and alcohol abuse starting from a very early age. He has used drugs to cope with his mental health issues and his prior burglary convictions were linked to drug use. Miller reported being sober and complying *943 with the terms of his probation for around two years prior to these convictions. It was not until his relapse that he again committed a crime.
In State v. Osborn, this Court stated that, although not a defense to the crime, "substance abuse is a proper consideration in mitigation of punishment upon sentencing." 102 Idaho 405, 414 n. 5, 631 P.2d 187, 196 n. 5 (1981). The State argues that substance abuse can also be an aggravating factor and cites two cases to support that position. In State v. Galaviz the defendant was convicted of two counts of robbery, where he had held knives to two female store clerks' throats, one of whom was pregnant. 123 Idaho 47, 844 P.2d 29 (Ct.App.1992). The trial court noted that substance abuse played a part in the defendant's criminal history, which was extensive. Id. at 49, 844 P.2d at 31.
However, the district court did not consider Miller's substance abuse to be a mitigating factor. The court stated, "Even if I believe that your choices were controlled by the drugs you were on, which I don't believe, you were the one that chose to take those drugs. You were the one that chose to abscond from probation and to resume using illegal drugs."
Miller also argues that the support of his family should be considered as a mitigating factor. The district court took Miller's familial support into consideration when issuing its sentence but not as a mitigating factor. The court read the letters of support and heard testimony from Miller's father and friend. The court stated "[w]hile they're certainly helpful to giving me some background on who you could be and as pleas for mercy, they're not particularly helpful to me regarding my decision of what justice requires of you."
Finally, Miller argues that the sentence is excessive based on his criminal history. He argues that, although he has two prior burglary felonies, those were charged a month apart, and until this, he had not had any significant problems with probation. The absence of a criminal record is a mitigating factor that courts consider. State v. Owen, 73 Idaho 394, 402, 253 P.2d 203, 207 (1953) (overruled on other grounds). In Shideler, this Court noted that the defendant had not committed any crimes in the past, and "except for this particular incident the defendant's character was good." Shideler, 103 Idaho at 595, 651 P.2d at 529. This is Miller's first offense of a violent nature, but it is not his first offense. In addition to his prior felony convictions, Miller had numerous misdemeanor convictions, so the district court acted reasonably when it did not consider Miller's prior criminal history as a mitigating factor.

d. Miller's Mental Condition
The district court recognized that Miller's mental health status might be a significant factor at sentencing, so it ordered a psychological evaluation pursuant to I.C. § 19-2524. "The defendant's mental condition is simply one of the factors that must be considered and weighed by the court at sentencing." State v. Strand, 137 Idaho 457, 461, 50 P.3d 472, 476 (2002). When the defendant's mental health status is significant for sentencing purposes, I.C. § 19-2523 requires the court to look at several factors:
(a) The extent to which the defendant is mentally ill; (b) The degree of illness or defect and level of functional impairment; (c) The prognosis for improvement or rehabilitation; (d) The availability of treatment and level of care required; (e) Any risk of danger which the defendant may create for the public, if at large, or the absence of such risk; (f) The capacity of the defendant to appreciate the wrongfulness of his conduct or to conform his conduct to the requirements of law at the time of the offense charged.
I.C. § 19-2523(1)(a)-(f). The statute does not require that a defendant's mental condition be the controlling factor at sentencing, nor does it require the district court to specifically reference all of the factors. Strand, 137 Idaho at 461, 50 P.3d at 476. However, the record has to show that "the court adequately considered the substance of the factors" when it imposed the sentence. Id.
In Strand, the sentencing was postponed to conduct a psychological evaluation, and the record showed the court had reviewed the evaluation and quoted parts of it. Id. In *944 addition to the defendant's mental health, the district court considered his juvenile record, his failed treatment in the past, his refusal to take responsibility for his actions, and his long history of anger. Id. at 461-62, 50 P.3d at 476-77. The district court considered the defendant's mental health but placed greater emphasis on the need to protect the community and to punish the defendant. Id. at 462, 50 P.3d at 477. The defendant was sentenced to fourteen years for three counts of lewd conduct with a child under sixteen and one count of sexual abuse of a child under sixteen. Id. at 460, 50 P.3d at 475. This Court held that the sentencing judge had adequately weighed the factors. Id. at 462, 50 P.3d at 477.
The district court in this case recognized that Miller's mental health was a significant factor. Here, as in Strand, the district court continued Miller's sentencing so it could order a psychological evaluation, and it explicitly referenced to the evaluation and quoted from parts of it. The district court concluded that "the evaluation says there is no notable functional impairment inability, no impairment in working with legal representation, and no need for mental health treatment so long as Mr. Miller avoids substance abuse." These comments squarely address elements in I.C. § 19-2523(1). Even though the district court is not required to specifically reference the factors, the extent of mental illness and functional impairment, as well as the prognosis for rehabilitation are all present.
In reaching its decision, the district court considered Miller's mental illness stating, "[b]ipolar is certainly a condition. It is certainly a diagnosis. I don't doubt that you have it, but it is not an excuse. There are bipolar people that succeed every day in society." While the comment has no bearing on I.C. § 19-2523, it demonstrates that the judge considered Miller's mental health. Rejection of mental illness as a significant factor does not indicate that mental health was not considered. The court went on to discuss the seriousness of Miller's crime, his progression from misdemeanors to felonies, and the objectives of protecting society, deterrence, and punishment. By appropriately considering these factors, as well as Miller's mental health, the district court issued a sentence consistent with I.C. § 19-2521 and I.C. § 19-2523.

IV. CONCLUSION
We hold that the district court had subject matter jurisdiction to sentence Miller as a persistent violator. Based upon Miller's unconditional plea of guilty he has waived any due process objections.
We hold that the district court adequately considered Miller's mental condition under I.C. § 19-2523 and did not abuse its discretion in sentencing Miller. We affirm the district court's judgment.
Justices EISMANN, J. JONES, W. JONES and HORTON concur.
