
973 P.2d 1151 (1999)
Gene V. MARTIN, Jr., Appellant,
v.
STATE of Alaska, Appellee.
No. A-6699.
Court of Appeals of Alaska.
February 19, 1999.
*1152 Allan R. Thielen, Assistant Public Defender, Kodiak, and Barbara K. Brink, Public Defender, Anchorage, for Appellant.
Nancy R. Simel, Assistant Attorney General, Office of Special Prosecutions and Appeals, Anchorage, and Bruce M. Botelho, Attorney General, Juneau, for Appellee.
Before: COATS, Chief Judge, and MANNHEIMER and STEWART, Judges.

OPINION
MANNHEIMER, Judge.
On the evening of January 25, 1996, Gene V. Martin asked a female acquaintance, K.W., to go for a ride with him. Martin's ostensible purpose was to have a frank conversation with K.W. about a mutual friend. During this drive, Martin stopped his truck and offered K.W. some cocaine; she accepted. After they shared the cocaine, Martin drove to a remote location. He asked K.W. to get out of the truck, telling her that he needed to fold the seat forward so that he could reach something in the cab. Both Martin and K.W. got out of the vehicle. Then Martin grabbed K.W., held a knife to her throat, and told her she would have to "pay" for the cocaine. Martin forced K.W. into the bed of the pickup, where he sexually assaulted her in various ways over the course *1153 of two hours. K.W. initially fought Martin, but he was considerably bigger than she was, and K.W. ultimately submitted after Martin struck her in the face particularly forcefully.
Martin was initially indicted for kidnapping and several counts of first-degree sexual assault. Ten months later, the State filed a superseding information charging Martin with only one offense: third-degree misconduct involving a controlled substance (delivery of cocaine).[1] Martin pleaded no contest to this substitute charge, and he received a sentence of 9 years' imprisonment with 2 years suspended (7 years to serve). Martin was also ordered to participate in sex offender treatment during his imprisonment, if such treatment was offered to him by the Department of Corrections.
In this appeal, Martin asserts that this sentence is excessive. He also challenges the provision requiring him to participate in sex offender treatment. For the reasons explained here, we affirm Martin's sentence.

Martin's criminal history, and the evidence adduced at the sentencing hearing
Martin's offense, third-degree controlled substance misconduct, is a class B felony.[2] Martin had one previous felony conviction: in 1992, in the State of Washington, Martin climbed on top of a sleeping woman and penetrated her vagina with his fingers; based on this conduct, he was convicted of attempted second-degree rape. Because he was a second felony offender, Martin faced a presumptive term of 4 years' imprisonment for his present drug offense.[3]
In addition to his 1992 felony conviction from Washington, Martin had committed other assaults on women. In 1989, in Palmer, Martin was convicted of assault for beating up his wife, T.N. Martin received a suspended imposition of sentence for this offense after T.N. asked the authorities to drop the charge.
When T.N. was contacted by the pre-sentence investigator in preparation for the sentencing in the present case, T.N. told the investigator that she believed Martin had participated in a 1986 sexual assault on a nude dancer in the Soldotna area. On the evening of the rape, Martin and two friends visited the bar where the dancer worked. The next morning, the police came to Martin's home to question him about his possible knowledge of this crime. According to T.N., Martin lied to the officers: he told them that he had not gone out the previous night. Then, after the officers had gone, Martin left the house and returned to the bar to "`dump' the dancer's purse [there]".
In addition to speaking with the pre-sentence investigator, T.N. also testified at Martin's sentencing hearing. She told the court that, during her marriage to Martin, Martin had frequently beaten her. She described one occasion in which Martin beat her and gouged her eyes until blood ran down her face. In addition, Martin often threatened to kill T.N.; sometimes, he would threaten to cut her body into little pieces and throw the pieces into Cook Inlet.
T.N. ultimately left Martin in November 1990, after she found out that Martin had assaulted a woman in the El Toro Lounge, a bar in the Palmer-Wasilla area. The victim of this assault, J.G., also testified at Martin's sentencing hearing.
J.G. told the court that, on November 9, 1990, she had gone to use the women's restroom at the El Toro. When she opened the stall, Martin was there, sitting on the toilet so that his feet wouldn't show. Martin pushed J.G. aside and left the restroom.
J.G. thought that Martin was gone, so she went ahead and used the toilet. But as she was standing up and fastening her pants, Martin broke into the stall again and grabbed her. He slammed her against the back of the stall. When J.G. screamed, Martin put his hand over her mouth. J.G. then kicked Martin in the groin. When Martin dropped down in pain, J.G. ran past him out of the restroom, and then she quickly told a friend what had just happened. By this *1154 time, Martin was running out the back door of the bar.
J.G., a male companion, and the El Toro bouncers chased Martin out in the parking lot. Martin tried to get into one of the little cabins nearby, but the doors were locked. J.G.'s companion tackled Martin, but the bouncers advised him to let Martin go, so the companion released him. Martin jumped up and ran to his van. Martin had apparently planned for a speedy escape, because the engine was already running.
As Martin was leaving the restaurant parking lot, he backed his van into another vehicle, causing approximately $1400 in damage. He then fled the scene. Martin drove recklessly down the highway, speeding and passing several vehicles in an attempt to beat a railroad train to a crossing. He was unsuccessful: his van was struck by the train, causing the vehicle to leave the road and overturn. Martin, however, was only slightly injured, and he fled on foot.
When he returned home, Martin lay down to sleep on the couch. T.N. knew that he was injured, so the next morning she went to Martin's workplace to see if she could find out what actually had happened the night before. Martin's boss told her that Martin was suspected of assaulting a woman in the El Toro Lounge. When T.N. went to the El Toro and the bartender confirmed that this was true, T.N. decided to leave Martin. She called the police and let them know where to find Martin. She then took the children and went to stay at a neighbor's house. The next day, Martin found her. He banged on the door of the house and threatened to kill her. T.N. met her husband with a shotgun; she told Martin that she would shoot him then and there if he didn't leave. That was the last time T.N. saw Martin until the sentencing hearing in this case.
Based on this incident at the El Toro Lounge, Martin was charged with misdemeanor assault in the Palmer district court. Released on bail, he then failed to appear and a bench warrant was issued for his arrest. This warrant was still pending some five years later when Martin was arrested in the present case.

Aggravating and mitigating factors
Based on this criminal history and the facts of the present case, Superior Court Judge Donald D. Hopwood found that the State had proved several aggravating factors under AS 12.55.155(c): (c)(1)that Martin inflicted physical injury on K.W.; (c)(7)that Martin's prior felony (the attempted rape in Washington) was a more serious class of felony than his current offense; (c)(8)that Martin's criminal history included aggravated or repeated instances of assaultive behavior; (c)(10)that Martin's offense (delivery of cocaine) was among the most serious conduct included within the definition of the offense; (c)(12)that Martin was on release from a misdemeanor charge involving assault (the assault at the El Toro Lounge) when he committed the present offense; and (c)(20)that Martin was on felony probation (his probation from the 1992 attempted rape in Washington) when he committed the present offense.
Martin proposed three mitigating factors under AS 12.55.155(d): (d)(9)that Martin's offense was among the least serious conduct within the definition of the crime; (d)(14)that Martin's delivery of cocaine involved only a small amount; and (d)(15)that Martin's delivery of cocaine had not been done for profit. Judge Hopwood found that Martin had proved the last of these mitigators, but he rejected the other two.
On appeal, Martin contends that Judge Hopwood should have found mitigator (d)(14)that Martin's delivery of cocaine involved only a small amount. Martin bases his argument on the contention that he gave K.W. only 1/2-gram of cocaine. This may have been the amount of cocaine that K.W. consumed, but Judge Hopwood found that Martin "delivered" (that is, handed K.W.) the entire 1-gram slip. Judge Hopwood also found that 1 gram of cocaine is a "typical amount ... delivered for immediate use". Martin has failed to show that either of these findings is clearly erroneous.[4] We therefore *1155 uphold Judge Hopwood's ruling on mitigator (d)(14).
Martin also challenges Judge Hopwood's ruling that the State proved aggravator (c)(10) (conduct among the most serious) and his concomitant ruling that Martin failed to prove mitigator (d)(9) (conduct among the least serious). The gist of Martin's argument is that the seriousness of his drug offense should be judged solely on the circumstances directly relating to his delivery of the cocaine to K.W.for example, the quantity of the drug, and whether Martin expected to profit monetarily from the delivery. Martin contends that his sexual and physical assaults on K.W. are irrelevant to determining the seriousness of his drug offense, and therefore Judge Hopwood should not have considered this aspect of Martin's behavior when he ruled on aggravator (c)(10) and mitigator (d)(9).
Judge Hopwood's ruling that the State had proved aggravator (c)(10) was based on the judge's factual finding that Martin's delivery of cocaine to K.W. was "just one part of the crime he set up, [just one part of] the design he had with this particular victim". Judge Hopwood explicitly stated that his ruling with regard to aggravator (c)(10) was based not simply on the fact that Martin had sexually assaulted K.W., but rather on the fact that Martin's delivery of cocaine to K.W. was motivated by his intention to commit a sexual assault:
THE COURT: I want to emphasize to everybody, and for the record, that the defendant is not being sentenced for sexual assault. But it's impossible to ignore that [assault] or to separate it out, since [the assault] was part of the circumstances: it was an integral part of the setting, and [it was] part of the defendant's purpose in delivering the cocaine.
...
[The delivery of cocaine] was done for the defendant's own sexual gratification, and it was done by design.... The return [on the cocaine] was sexual gratification. And it's pretty clear to me, from all the evidence, that the defendant was going to [obtain] his gratification regardless of [K.W.]'s consent. And he was going to do it by force, or he was going to do it by making her vulnerable if she was under the influence of cocaine.... When I [examine] the defendant's history, and when I see the design and purpose he had in this case, I think the delivery of the cocaine was most serious.
In attacking Judge Hopwood's ruling, Martin relies on language from this court's decision in Brezenoff v. State[5]:
AS 12.55.155(c)(10) stresses the conduct involved in the specific offense under consideration rather than the personal characteristics of the offender[.] [It] requires comparison of the conduct constituting the crime in question with other conduct which would satisfy the elements of the offense. This aggravating factor does not require a comparison of the defendant to other potential defendants committing the offense.
658 P.2d at 1363.
It is true that aggravator (c)(10) focuses on the defendant's conduct, not the defendant's personal characteristics. But Judge Hopwood did not rely on Martin's personal characteristics; he based his decision on Martin's motive for giving cocaine to K.W. and on the conduct that ultimately accompanied Martin's delivery of this drug. This was proper. Our prior decisions construing aggravator (c)(10) are inconsistent with the restrictive definition of "conduct" that Martin proposes.
For example, in Curl v. State[6] the defendant was convicted of a single count of sexual abuse of a minor. The sentencing judge found aggravator (c)(10) based on evidence that the charged incident of sexual abuse was but one of a series of twenty to twenty-five similar episodes, committed over a period of *1156 approximately four months, many of which apparently involved multiple acts of sexual contact. We upheld the sentencing judge's finding of aggravator (c)(10).[7]
And in Machado v. State[8], the defendant was sentenced for perjury. The sentencing judge found aggravator (c)(10) based on the fact that Machado's perjury went to a material issue and the fact that Machado committed the perjury in an attempt to escape prosecution for his part in a car bombing. We upheld the sentencing judge's finding of aggravator (c)(10).[9] In particular, we noted that "Machado's motive for giving the false testimony ... seem[s] to make his offense particularly severe."[10]
We therefore conclude that Judge Hopwood properly considered Martin's motive for delivering cocaine to K.W.. And, because Judge Hopwood concluded that Martin's motive for this crime was to accomplish a sexual assault, Judge Hopwood could properly conclude that Martin's ensuing physical and sexual assaults on K.W. were related to the delivery of cocaine and aggravated that offense.

The length of Martin's sentence
In Judge Hopwood's sentencing remarks, he stressed two aggravators: (c)(8) (Martin's history of assaultive behavior) and (c)(10) (conduct among the most serious within the definition of the offense). The judge concluded that these two aggravators were important because the delivery of cocaine was accompanied by an "extreme[ly] assaultive" rape, and because the accomplishment of this rape was Martin's motive for delivering the cocaine.
Judge Hopwood also found that Martin's potential for rehabilitation was "poor". The judge reached this conclusion based on several factors: Martin's criminal record, the judge's personal observations of Martin in court, and the fact that Martin had never shown remorse or accepted responsibility for his actions. These second and third factors require an explanation.
As noted above, K.W. testified at Martin's sentencing hearing; she described her meeting with Martin, the delivery of cocaine, and the ensuing assault. The State called K.W. to rebut Martin's testimony: Martin took the stand at the sentencing hearing and, in lengthy testimony, he denied that a sexual assault had occurred. Martin testified that he went driving with K.W. because K.W. propositioned him, offering her body in exchange for cocaine. Martin further testified that, after they shared the cocaine, K.W. willingly kissed and fondled Martin. Martin then drove to a secluded location, where they engaged in consensual sex. Martin denied assaulting K.W. with the knife, and he denied beating her.
When Judge Hopwood announced his findings of fact at the conclusion of the sentencing hearing, he implicitly found that Martin had committed multiple instances of perjury during his testimony. The judge found that K.W. had not offered herself for cocaine and that K.W. had not intended to engage in sexual relations with Martin. The judge further found that Martin restrained K.W., held a knife against her throat, and then engaged in multiple acts of sexual penetration against her will. In other words, Judge Hopwood found that Martin's account of those events was knowingly false.
Judge Hopwood found that Martin's delivery of cocaine was a crime of design, motivated by a plan to sexually assault K.W.. The judge noted that Martin had repeatedly engaged in assaultive conduct against women even while he was on probation from his attempted rape conviction in Washington. He also noted that Martin had engaged in repeated acts of dishonesty as well as repeated violations of bail conditions and probation conditions. Judge Hopwood found that Martin had a severe, long-term alcohol and drug problem. He noted that Martin had made promises of rehabilitation in the past, but nothing had ever come of these promises.
*1157 Based on these findings, Judge Hopwood assessed the term of imprisonment he would impose. As already noted, Martin's offense is a class B felony and Martin, as a second felony offender, faced a presumptive 4-year term. Judge Hopwood noted that, under the benchmark sentencing ranges established in State v. Jackson for first felony offenders convicted of class B felonies[11], a defendant who commits an "exceptionally aggravated" class B felony (one involving significant aggravating factors) can receive up to 6 years to serve.[12] Judge Hopwood concluded, for the reasons explained above, that Martin's offense was "exceptionally aggravated" under the Jackson categories. The judge reasoned that, because Martin was a second felony offender, he should receive a more severe sentence than a similar first felony offender would receive under the Jackson benchmarks. The judge therefore sentenced Martin to serve 7 years in prison (9 years with 2 years suspended).
We agree with Judge Hopwood that Martin's offense is exceptionally aggravated. Martin has a lengthy history of physical and sexual assaults on womenincluding acts of physical and sexual violence committed while Martin was on felony probation from an attempted rape conviction in the State of Washington. Judge Hopwood could justifiably conclude that Martin is a dangerous offender. Moreover, based on Martin's recidivism, his lack of remorse, and his failure to take responsibility for his crimes (indeed, his extensive perjury at the sentencing hearing), Judge Hopwood could properly conclude that Martin's prospects for rehabilitation were poor.
Under the circumstances of this case, a sentence of up to 6 years to serve would have been supportable if Martin had been a first felony offender. But he was a second felony offender. Given Martin's status as a second felony offender, we conclude that his sentence of 7 years to serve is not clearly mistaken.[13]

The provision that Martin must participate in sex offender treatment if such treatment is offered to him in prison
Finally, Martin challenges Judge Hopwood's decision to require him to engage in sex offender treatment while in prison if the Department of Corrections offers him such treatment. Martin asserts that "it is difficult to ascertain from the record why the sentencing [judge] ordered sex offender treatment".
Martin's contention is close to frivolous. Martin committed multiple acts of sexual assault on K.W. in this case. In 1992, he was convicted of attempted rape in Washington. And, in 1990, he hid in the women's restroom of a bar and assaulted a woman there. This record certainly justifies the conclusion that Martin is in need of sex offender treatment.
The fact that Martin was convicted of a drug offense rather than a sexual offense did not bar Judge Hopwood from ordering Martin to engage in sex offender treatment. In Miyasato v. State[14], we upheld a sentencing judge's decision to require the defendant to engage in sex offender treatment even though he was convicted of a property crime (burglary), not a sex crime.[15] We noted that
[although] [c]onditions of probation must be reasonably related to the rehabilitation of the offender and the protection of the public, ... a condition of probation need not directly relate to the offense for which the defendant stands convicted. [For example, in] Allain v. State, 810 P.2d 1019 (Alaska App.1991), this court upheld a probation condition that forbade the defendant from drinking alcoholic beverages, even though the defendant's offense was not alcohol-related. Allain, 810 P.2d at 1022-23. This court upheld the condition because it enhanced the defendant's prospects for rehabilitation[.] *1158 Miyasato, 892 P.2d at 201-02 (some citations and internal quotations omitted). Miyasato had a record of sex offenses, and his prior behavior exhibited misogyny. We therefore concluded that there was "ample basis for [the sentencing judge] to conclude that sex offender treatment was integrally related to Miyasato's rehabilitation and to the future protection of the public."[16]
Martin concedes that Miyasato and Allain (cited in the excerpt from Miyasato) allow sentencing courts to order defendants to engage in rehabilitative programs that are not directly related to the offense for which they are being sentenced. Martin argues, however, that Judge Hopwood never made explicit findings to support his decision to order Martin to participate in sex offender treatment.
Given the record in this case, the basis for Judge Hopwood's decision would be clear even if the judge had failed to address this issue. But he did. Judge Hopwood declared that he viewed Martin's behavior in the present case
[as] a continuation of a pattern ..., [a continuation of behavior] that the defendant has done before in various ways. This incident here involved a physical and sexual assault. I've already noted [that] he's committed prior assaults, and at least one sexual assault in Washington. And [in] these other incidents, ... maybe all of them, but at least most of them, the defendant had consumed alcohol or drugs. And in the [Washington] case, the victim of the sexual assault was intoxicated.
. . .
[I]t just seems to me that the delivery of the cocaine here was just one part of the crime he set up, [one part of] the design he had with this particular victim[.] ... And he's done that before.... [T]he defendant is not being sentenced on the sexual assault, but it's impossible to ignore that [sexual assault] or to separate it out, since it was part of the circumstances. It was an integral part of the setting, and part of the defendant's purpose in delivering the cocaine.... [T]his incident here, and [also] the Washington case, [were] done for the defendant's own sexual gratification and [were] done by design.
In light of these findings, Judge Hopwood's decision to order Martin to engage in sex offender treatment was reasonably related to Martin's rehabilitation and to the future protection of the public.

Conclusion
The superior court's sentencing decision is AFFIRMED.
NOTES
[1]  AS 11.71.030(a)(1).
[2]  AS 11.71.030(c).
[3]  AS 12.55.125(d)(1).
[4]  See Lepley v. State, 807 P.2d 1095, 1099 n. 1 (Alaska App.1991) (holding that a sentencing judge's findings concerning proposed aggravating and mitigating factors are reviewed under the "clearly erroneous" test); Knight v. State, 855 P.2d 1347, 1349 (Alaska App.1993) (for purposes of applying mitigator (d)(14), a "small quantity" is a quantity that is uncharacteristically small when compared to the broad middle-ground covered by a typical drug case).
[5]  658 P.2d 1359, 1363 (Alaska App.1983).
[6]  843 P.2d 1244 (Alaska App.1992).
[7]  See id. at 1245.
[8]  797 P.2d 677 (Alaska App.1990).
[9]  See id. at 690.
[10]  Id.
[11]  776 P.2d 320, 326-27 (Alaska App.1989).
[12]  See id. at 326.
[13]  See McClain v. State, 519 P.2d 811, 813-14 (Alaska 1974) (holding that an appellate court will affirm a sentencing decision unless it is clearly mistaken).
[14]  892 P.2d 200 (Alaska App.1995).
[15]  Id. at 200-01.
[16]  Id. at 202.
