
937 P.2d 424 (1997)
130 Idaho 112
STATE of Idaho, Plaintiff-Respondent,
v.
Johnny Lynn BRASHIER, Defendant-Appellant.
No. 22823.
Court of Appeals of Idaho.
March 12, 1997.
*425 Severt Swenson, Jr., Gooding, for defendant-appellant.
Alan G. Lance, Attorney General; Catherine O. Derden, Deputy Attorney General, Boise, for plaintiff-respondent.
PERRY, Justice.
This is a sentence review. Charges were brought against Johnny Lynn Brashier as the result of an incident wherein Brashier forced a woman to perform fellatio at knife-point. Brashier entered a conditional plea of guilty to a charge of infamous crime against nature. I.C. § 18-6605. In exchange for the guilty plea, the state dismissed two related charges of kidnapping and assault with a deadly weapon. Brashier appealed from the district court's denial of two motions to dismiss. The state cross-appealed from the sentence imposed, arguing that the district court erred by sentencing Brashier without considering the proper legal standard and by granting excess credit for time served. This Court reviewed the record and affirmed the judgment of conviction and denial of the motions for dismissal. State v. Brashier, 127 Idaho 730, 905 P.2d 1039 (Ct.App.1995). We determined that the district court had misunderstood the applicable sentencing provisions and had granted Brashier excess credit for time served. Accordingly, we remanded the case for resentencing. Id.
Upon remand, the district court resentenced Brashier to a fixed term of nine years with credit for 535 days served. Brashier appeals, arguing that he is entitled to additional credit for time served and further claiming that the nine-year term is an abuse of the district court's discretion.
Brashier was serving a sentence for burglary at the state penitentiary when the charges in this case were filed against him. He asserted in his prior appeal that he was denied parole due to suspicion that he was involved in this case and, as such, was entitled to credit for time served as of the date he became a suspect. This Court determined that he was not entitled to credit for time served in that situation.
On appeal, Brashier now argues that he is entitled to credit for time served as of the date the charges were filed against him in this case. Whether the district court properly applied the law governing credit for time served to the facts is a question of law over which we exercise free review. Brashier, 127 Idaho at 738, 905 P.2d at 1047.
An individual is to receive credit in the judgment of conviction for any period of incarceration served prior to the entry of judgment, "if such incarceration was for the offense ... for which the judgment was entered." I.C. § 18-309. This court has previously clarified that:
An entitlement to credit under I.C. § 18-309 depends upon the answer to a simple inquiry: was the defendant's incarceration upon the offense for which he was sentenced? If a particular period of confinement served prior to the imposition of *426 sentence is not attributable to the charge or conduct for which a sentence is to be imposed, the offender is not entitled to credit for such confinement....
State v. Hale, 116 Idaho 763, 765, 779 P.2d 438, 440 (Ct.App.1989). In our prior opinion, we answered the critical question, concluding, "Brashier's incarceration in the state penitentiary from May 12, 1993, forward was attributable to his previous conviction for attempted burglary." Brashier, 127 Idaho at 738, 905 P.2d at 1047.
Brashier argues on appeal that he would have been granted parole, but for the investigation and eventual charges relating to this case. As noted above, this issue was already disposed of in Brashier's prior appeal. Although this Court indicated that Brashier was most certainly not entitled to credit for time which was served prior to his even being charged, we in no way indicated that the he was entitled to credit for time served after the charges were filed. Under the facts of this case, Brashier's incarceration was not attributable to the charge of infamous crime against nature until he was initially sentenced for that crime. The sentence he was already serving for burglary and the sentence for the crime in this case then began to run concurrently. Even assuming that the investigation and charges in this case led to the denial of Brashier's parole, his term of incarceration at that time was still due to the burglary conviction. Just as parole or probation may be revoked due to criminal activity unrelated to the underlying offense, so to, it may be denied without altering the crime to which the sentence is attributable. See State v. Chapman, 111 Idaho 149, 155, 721 P.2d 1248, 1254 (1986); State v. Wilson, 127 Idaho 506, 510-11, 903 P.2d 95, 99-100 (Ct.App.1995). Hence, we conclude that the district court correctly determined that Brashier was entitled to credit for time served as of the date he was initially sentenced for the crime in this case.
Prior to the reimposition of sentence in this case, Brashier and his attorney both commented to the district court on Brashier's propensity to violate the terms of parole. In fact, Brashier requested the reinstatement of the fixed five-year term of incarceration, saying, "I don't have very much good luck on paroles. I don't know why I don't. I just never have." Brashier now argues that the district court should have imposed a sentence consisting of education, drug rehabilitation, a lesser fixed term and an earlier parole date. Brashier also claims on appeal that the nine-year sentence is unreasonable.
Sentencing is a matter for the trial court's discretion. Both our standard of review and the factors to be considered in evaluating the reasonableness of the sentence are well-established. See 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); State v. Toohill, 103 Idaho 565, 568, 650 P.2d 707, 710 (Ct.App.1982).
The district court carefully reviewed the goals of sentencing prior to imposing sentence. The district court considered the violent and sexual nature of the crime and Brashier's prior criminal conduct. The district court determined that Brashier's criminal record and history of alcohol abuse indicated a risk that Brashier would commit further crimes. The district court also determined that a term of confinement was necessary to accomplish the primary objective of sentencing, protection of society, as well as the related goals of deterrence, rehabilitation and retribution. In setting the term of confinement at nine years, the district court stated that a lesser sentence would depreciate the seriousness of the crime.
Having thoroughly reviewed the record in this case, and having further considered the nature of the offense and Brashier's character, we conclude that the district court did not abuse its discretion in imposing Brashier's sentence. The determinate sentence of nine years for infamous crime against nature, with credit for 535 days served, is affirmed.
WALTERS, C.J., and LANSING, J., concur.
