
585 N.W.2d 209 (1998)
STATE of Iowa, Appellee,
v.
David Otto KOSTMAN, Appellant.
No. 97-781.
Supreme Court of Iowa.
September 23, 1998.
*210 Linda Del Gallo, State Appellate Defender, and Robert P. Ranschau, Assistant State Appellate Defender, for appellant.
Thomas J. Miller, Attorney General, Sheryl A. Soich, Assistant Attorney General, Denver D. Dillard, County Attorney, and Harold L. Denton, Assistant County Attorney, for appellee.
Considered by McGIVERIN, C.J., and LARSON, LAVORATO, NEUMAN, and TERNUS, JJ.
PER CURIAM.
The defendant, David Kostman, appeals from his conviction for lascivious acts with a child, as a sexual predator and an habitual offender, in violation of Iowa Code sections 709.8, 901A.2, and 902.8 (1997).[1] For the reasons that follow, we reject Kostman's claims that there was insufficient evidence to support the conviction and the sentencing court erred in applying both the sexual predator and habitual offender enhancements. See Iowa Code §§ 901A.2(3), 902.9(2).

I. Background Facts and Proceedings.
In October 1996, the State charged Kostman, then sixty-two years old, by trial information with lascivious acts with a child after he allegedly engaged in sexual acts with a thirteen-year-old boy in July or August 1996.
At trial in March 1997, the victim, then age fourteen, testified Kostman gave him money in exchange for sex acts. He also stated there were three sexual encounters in Kostman's home from July to August 1996. The victim further admitted he once recanted the allegations because he and Kostman "went camping together and always had fun and [he] didn't want to see nothing happen to him and it was just [he] was just kind of scared." Defense counsel conducted a *211 lengthy cross-examination of the victim emphasizing details the victim could not remember and inconsistencies between his trial testimony and prior statements, including contradictions regarding Kostman's physical attributes and alleged threats, and the victim's motivation to fabricate the allegations.
The victim's father testified and confirmed his son recanted the allegations on one occasion. He admitted his son is not always truthful, but stated he explained to him the importance of telling the truth regarding the abuse. Detective Tina Debban testified she interviewed Kostman. Kostman confessed he gave the boy money and fishing poles in exchange for sex acts, and admitted the sexual acts occurred three times during July or August 1996. Detective Debban also testified she drafted the written confession and read it to Kostman, who then voluntarily signed it. The statement was admitted into evidence.
Kostman did not testify. His sister testified about his slow and easygoing nature. An investigator testified and provided evidence to contradict the victim's recollection of Kostman's physical characteristics.
The jury returned a guilty verdict and the court later adjudged Kostman an habitual offender based upon his six prior felony convictions for lascivious acts with a child. The court sentenced Kostman to an indeterminate prison term not to exceed thirty years, applying both the habitual offender and sexual predator enhancement provisions.
Kostman appeals. He argues the trial court should have granted his motion for judgment of acquittal based upon the insufficiency of the evidence. Kostman also contends the district court should have applied only the sexual predator enhancement statute for a maximum prison term of up to twenty-five years.

II. Sufficiency of the Evidence.
Kostman believes the trial court should have granted his motion for judgment of acquittal, focusing mainly on the inconsistencies in the victim's testimony. He claims the victim's testimony was so unbelievable it cannot be used to support the guilty verdict. See State v. Smith, 508 N.W.2d 101 (Iowa App.1993). Additionally, he blames signing the confession on his easygoing nature and his desire "to curry favor with an authority figure such as a police officer."
In reviewing challenges to the sufficiency of evidence, we view the evidence in the light most favorable to the State. State v. Robinson, 288 N.W.2d 337, 340 (Iowa 1980). We consider all the evidence, not just evidence supporting the verdict, and will uphold a jury's verdict if it is supported by substantial evidence. Id. at 339-40. Evidence is substantial if a rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt. State v. Anderson, 517 N.W.2d 208, 211 (Iowa 1994). Generally, the credibility of witnesses is left to the jury; however, there are limitations to this rule. State v. Mitchell, 568 N.W.2d 493, 503 (Iowa 1997). A witness's testimony "may be so impossible, absurd, and self-contradictory that the court should deem it a nullity." Id.
We conclude the victim's testimony was not absurd or unbelievable. His version of the facts given at trial comported with the detailed written confession signed by Kostman. His trial testimony and prior statements were also sufficiently consistent regarding the time, place, and nature of the sexual acts. The jury heard the victim's version of the facts, as well as his reasons for recanting the allegations, and witnessed his demeanor at trial. A reasonable jury could have concluded he was a credible witness.
Additionally, there is absolutely no evidence Kostman did not voluntarily sign the confession. The trial court denied Kostman's motion to suppress the confession, and Kostman does not contest that ruling on appeal. We find Kostman's argument that he is so easygoing that he signed the statement just to curry favor with Detective Debban to be wholly unconvincing and without merit.
In viewing all of the evidence in the light most favorable to the State, a rational jury could have found the defendant committed the crime beyond a reasonable doubt. The trial court did not err in refusing to grant Kostman's motion for judgment of acquittal.


*212 III. Application of Sentencing Enhancements.

Kostman claims the sentencing court improperly applied both the sexual predator enhancement statute and the habitual offender statute. Section 901A.2(3) provides:
A person convicted of a sexually predatory offense which is a felony, who has a prior conviction for a sexually predatory offense, shall be sentenced to and shall serve twice the maximum period of incarceration for the offense, or twenty-five years, whichever is greater, notwithstanding any other provision of the Code to the contrary. A person sentenced under this subsection shall not have the person's sentence reduced under chapter 903A or otherwise by more than fifteen percent.
Based upon Kostman's habitual offender status, the court applied the habitual offender statute to arrive at an indeterminate sentence of fifteen years, see Iowa Code § 902.9(2), and doubled it pursuant to section 901A.2(3), for a total indeterminate sentence of thirty years. Because this thirty-year term is greater than the minimum twenty-five year term provided in section 901A.2(3), the court imposed an indeterminate thirty-year sentence.
Kostman does not challenge that he is both a sexual predator and an habitual offender. He argues, however, the sentencing court can only apply chapter 901A enhancements because that chapter provides the exclusive means to impose sentence for sexual predators, focusing on the phrase "notwithstanding any other provision of the Code to the contrary." He believes the court should have doubled the five-year term for the crime, see Iowa Code § 902.9(4), to arrive at an indeterminate ten-year term. Because the minimum term provided in section 901A.2(3) is greater, Kostman asserts the court should have imposed an indeterminate twenty-five-year sentence.
Kostman raises an issue of statutory interpretation; therefore, our review is for correction of errors of law. State v. Daniel, 574 N.W.2d 333, 335 (Iowa 1998). We will consider the challenged statute in its entirety and in para materia, or together, with other pertinent statutes. State v. Byers, 456 N.W.2d 917, 919 (Iowa 1990). Chapter 902 sets forth the general sentencing provisions for felonies, see Daniel, 574 N.W.2d at 334, and those general provisions must be read in pari materia with specific sentencing provisions found elsewhere in the Code. See id. at 335 (chapter 903); State v. Hildebrand, 280 N.W.2d 393, 397 (Iowa 1979) (section 901.5).
In viewing section 901A.2(3) in its entirety, we conclude Kostman's attempt to ignore his habitual offender status must fail. Other than providing enhancements based upon prior sexually predatory offenses, chapter 901A is silent regarding the punishment that must be imposed for the underlying offense. Therefore, the general sentencing provisions of chapter 902 must be applied and read together with chapter 901A. See State v. Sisk, 577 N.W.2d 414, 416 (Iowa 1998); Bown v. State, 475 N.W.2d 3, 6-7 (Iowa 1991).
In applying section 902.9, we come to the inescapable conclusion that the habitual offender statute must apply to Kostman. Although Kostman was convicted of a class "D" felony which carries an indeterminate five-year term under section 902.9(4), that subsection cannot apply because Kostman is an habitual offender. See Iowa Code § 902.9(4) ("A class `D' felon, not an habitual offender, shall be confined for no more than five years...." (Emphasis added.)). Applying section 902.9(2), the maximum period of incarceration for this offense must be an indeterminate period of fifteen years. Turning to the specific sentencing provisions of section 901A.2(3), the fifteen-year term must then be doubled. Because this term is greater than the minimum term provided in section 901A.2(3), the sentencing court correctly imposed an indeterminate thirty-year term of imprisonment.

IV. Conclusion.
We find the trial court did not err in failing to grant the defendant's motion for judgment of acquittal. The evidence was sufficient to support the jury's guilty verdict. Additionally, based upon the application of the specific sentencing provisions of section 901A.2(3) and the general sentencing provisions of section *213 902.9, we conclude the sentencing court properly imposed an indeterminate thirty-year prison term. We therefore affirm Kostman's conviction and sentence.
AFFIRMED.
NOTES
[1]  Iowa Code chapter 901A became effective July 1, 1996. See 1996 Iowa Acts ch. 1082. For convenience, all references will be made to the 1997 Iowa Code.
