OPINION
¶ 1 In 2004, appellant John Ponsart, Jr., was convicted after pleading no contest to attempted molestation of a child. Pursuant to a stipulation in his plea agreement, the trial court suspended the imposition of sentence and placed him on lifetime probation. In 2008, after a contested probation violation hearing, the court found Ponsart had violated the terms of his probation, revoked it, and sentenced him to an aggravated prison term of fifteen years. On appeal, Ponsart relies on
State v. Schmidt,
Jurisdiction
¶ 2 As an initial matter, the state challenges our jurisdiction to consider Ponsart’s claim by way of appeal. Generally, we have jurisdiction to review a sentence challenged “on the grounds that it is illegal or excessive,” A.R.S. § 13-4033(A)(4), but, as the state correctly points out, our jurisdiction is limited by § 13-4033(B), which provides that a defendant in a noncapital ease “may not appeal from a judgment or sentence that is entered pursuant to a plea agreement or an admission to a probation violation.” Id. In this appeal, Ponsart challenges a sentence within the range authorized by his plea agreement and imposed following revocation of the probationary term entered pursuant to his plea. 2 We therefore must determine whether the legislature intended to characterize such a sentence as one “entered pursuant to a plea agreement” — over which we have no appellate jurisdiction — or whether, in preserving a defendant’s right to appeal from contested probation violation hearings, the legislature also intended to preserve a pleading defendant’s right to appeal a sentence imposed after a contested revocation of probation.
*520
¶3 In construing statutes, “our primary-goal is to discern and give effect to the legislature’s intent.”
State v. Fell,
¶ 4 When determining legislative intent, we give words their “plain and ordinary meaning” and “apply a practical and eommonsensical construction.”
State v. Alawy,
¶ 5 On one hand, we recognize that Pon-sart’s sentence after revocation was a consequence of his plea agreement in the general sense that the conviction arising from the plea agreement was a necessary causal prerequisite to the ultimate sentence he received. And, the sentencing was “in conformance to” the plea agreement to the extent the agreement determined the range of potential sentencing options.
¶ 6 On the other hand, the post-revocation sentence did not proceed directly from the agreement and was not imposed as a necessary or immediate consequence of the agreement.
Cf State v. Fuentes,
¶ 7 We thus turn to a reading of the statute as a whole and consider its spirit and purpose.
See Zamora,
¶8 A review of the statute’s spirit and purpose reinforces this understanding of our legislature’s intent. As this court has observed in
State v. Baca,
¶ 9 In construing § 13-4033(B), this court has made clear that a pleading defendant may not appeal from an order imposing probation upon conviction and may challenge that order only in a Rule 32 proceeding.
State v. Jimenez,
¶ 10 Moreover, we previously have found post-judgment orders appealable when the basis for challenge “could not have been raised in connection with the original judgment of guilt and imposition of probation.”
State v. Delgarito,
¶ 11 The state contends that our decision in
State v. Rodriguez-Gonzales,
¶ 12 In contrast to the new sentences imposed in Rodriguez-Gonzales and Celaya, Ponsart’s sentence of imprisonment did not replace his original probationary term as if it had never existed. Rather, the trial court imposed the prison term after intervening proceedings in which the court determined Ponsart had violated the terms of his probation. In short, our rationale for rejecting appellate jurisdiction in Rodriguez-Gonzales does not apply here.
Sentence
¶ 13 Having concluded we have jurisdiction to consider Ponsart’s appeal, we reject Ponsart’s claim that he received an illegal sentence. Relying on
State v. Schmidt,
When one or more clearly enumerated aggravators are found consistent with Ap-prendi [v. New Jersey,530 U.S. 466 ,120 S.Ct. 2348 ,147 L.Ed.2d 435 (2000) ], and they allow imposition of an aggravated sentence under the relevant statutory scheme, the “elements” of the aggravated offense will have been identified with sufficient clarity to satisfy due process. Subsequent reliance on other factors embraced by a catch-all provision to justify a sentence up to the statutory maximum comports with the traditional discretionary role afforded judges in sentencing.
Schmidt,
¶ 14 As the state points out, among other aggravating circumstances the trial court considered at sentencing, it found “there was physical and emotional harm caused to the victim,” an aggravating circumstance specifically enumerated by statute.
See
2003 Ariz. Sess. Laws, ch. 225, § 1 (listing “[t]he physical, emotional and financial harm caused to the victim” under former § 13-702(C)(9)). Thus, as long as sufficient evidence supported this finding — a “clearly enumerated aggravator [ ]” under
Schmidt
— the court did not err in considering other aggravating factors or in imposing an aggravated sentence.
Schmidt,
¶ 15 In a conclusory fashion, Ponsart asserts “[tjhere was no evidence that the victim suffered physical or emotional harm,” and argues, “if this aggravating factor had existed at the time [Ponsart] entered a guilty plea, he would surely not have been sentenced to a term of probation.” But he cites no authority supporting the proposition that a trial court must reject a plea agreement containing a stipulated disposition of probation on the ground it later might find aggravating circumstances at sentencing. Moreover, we agree with the state that the court’s finding of emotional harm was reasonably supported by the victim’s impact statement, which reported the child victim had experienced “nightmares, trouble sleeping [, and] crying for no reason,” and had needed professional counseling as a result of the molestation. We “ ‘defer to the trial court’s factual findings that are supported by the record and [are] not clearly erroneous,’ ” and we will overturn those findings “only if no substantial evidence supports them.”
State v. Rodriguez,
*523 ¶ 16 We find no error and no abuse of discretion in the tidal court’s imposition of sentence. We therefore affirm the court's revocation of Ponsart’s probation and the sentence imposed.
Notes
. Initially, Ponsart also argued he was sentenced wrongly under former A.R.S. § 13-604.01, 2001 Ariz. Sess. Laws, ch. 334, § 7, based on our decision in
State v. Gonzalez,
. In 2004, the trial court accepted Ponsart’s plea agreement, which provided by stipulation that, upon conviction, he would be placed on lifetime probation. The agreement further stated: "If probation is violated, the Defendant may be sentenced for up to the maximum fine and the maximum term of imprisonment [for] each offense." An addendum to the agreement provided that the applicable statutory range of prison sentences for the offense included a five-year minimum term, a ten-year presumptive term, and a fifteen-year maximum term. As part of the agreement, Ponsart waived "his right to appeal the judgment and sentence to a higher court.”
. Significant portions of the Arizona criminal sentencing code have been renumbered, effective "from and after December 31, 2008.” See 2008 Ariz. Sess. Laws, ch. 301, §§ 1-120. We refer in this opinion to the section number in effect at the time of the principal offense in this case, on April 4, 2004.
. The catch-all aggravating circumstance considered by the court in
Schmidt
was nearly identical to the provision in force when Ponsart committed his offense.
See
