
235 Cal.App.3d 799 (1991)
286 Cal. Rptr. 762
THE PEOPLE, Plaintiff and Respondent,
v.
WILLIAM LEE ALFORD, Defendant and Appellant.
Docket No. E007986.
Court of Appeals of California, Fourth District, Division Two.
October 28, 1991.
*801 COUNSEL
Robert Valencia, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, Richard B. Iglehart, Chief Assistant Attorney General, Harley D. Mayfield, Assistant Attorney General, Rudolf Corona, Jr., and Maxine P. Cutler, Deputy Attorneys General, for Plaintiff and Respondent.
*802 OPINION
HOLLENHORST, J.
Defendant was tried and convicted of three violations of Penal Code[1] section 243.4 (sexual battery) and two violations of section 149 (assault by a public official under color of authority). Imposition of sentence was suspended and defendant was placed on three years' probation. On appeal he contends there was insufficient evidence to support the sexual batteries because there was no evidence that defendant unlawfully restrained the victims. He also contends that the convictions for assault by an officer must be reversed because they are lesser included offenses to the sexual batteries.

FACTS
Defendant was a correctional officer employed by the County of Riverside. As part of his duties, he sometimes was responsible for the transportation of both male and female inmates between the Indio correctional facility and the Riverside jail.
In the early morning hours of May 6, 1988, defendant was to transport Mary L. and eight male inmates from Riverside to Indio. Mary L. was waist-chained and handcuffed by a female deputy and then taken by defendant and placed by the defendant in the van for transportation. Defendant undid Mary L.'s jumpsuit and proceeded to fondle her breasts. Again at the Indio facility defendant removed the male inmates, returned to the van and again opened Mary L.'s jumpsuit, fondled her breasts with his hands and mouth and placed Mary L.'s hand on his crotch area. He then took Mary L. into the jail.[2]
In a separate incident on June 6, 1988, defendant was transporting Susan T. from Riverside to Indio. Defendant stopped at the Banning jail to pick up male inmates. Before going into the jail, however, defendant unbuttoned Susan T.'s jumpsuit and fondled her breasts with his hands and his mouth. When Susan T. resisted, defendant hit her on the mouth.[3]

SEXUAL BATTERY
Section 243.4, subdivision (a) states that "[a]ny person who touches an intimate part of another person while that person is unlawfully restrained by *803 the accused or an accomplice, and if the touching is against the will of the person touched and is for the purpose of sexual arousal, sexual gratification, or sexual abuse, is guilty of sexual battery...." (Italics supplied.) (1a) Defendant's contention with respect to the three counts of sexual battery boils down to this: a correctional officer is not guilty of what otherwise would be a sexual battery when the person victimized is an inmate who previously has been placed in restraints for a lawful purpose.[4] The utter absurdity of this contention inclines us to reject it without further discussion. However, we will explain why we find the contention completely specious.
(2) Prior to enactment of section 243.4, sexually abusive conduct could only be prosecuted as a felony if the assailant assaulted the person with the specific intent to commit rape, sodomy, oral copulation, or any violation of section 264.1 (rape in concert with another), 288 (lascivious acts upon a child) or 289 (penetration of genitals or anus with foreign object). (§ 220.) Absent one of the specific intents, the crime was either misdemeanor assault or misdemeanor battery. (§§ 241 and 243.) The purpose of this section was to provide appropriate punishment for sexually abusive conduct which falls short of a violation of section 220 but which is nonetheless "physically traumatic and psychologically terrifying." (Sen. Republican Caucus Bill Dig., Assem. Bill No. 2721 (Aug. 12, 1982).) Accordingly, the statute allows for felony prosecution when a touching occurs while the person is unlawfully restrained and against the person's will and is committed for a sexual purpose.
(3) In addressing defendant's contention that the restraint here was "lawful," we begin with the rule that a court should ascertain the intent of the Legislature from a reading of the statute as a whole, consistent with its purpose. (People v. Shirokow (1980) 26 Cal.3d 301, 306-307 [162 Cal. Rptr. 30, 605 P.2d 859].) Where possible, every word, phrase or provision is presumed to have a purpose and serve a useful function. (Pacific Legal Foundation v. Unemployment Ins. Appeals Bd. (1981) 29 Cal.3d 101, 114 [172 Cal. Rptr. 194, 624 P.2d 244].) When given a choice between a reasonable construction  one which is consistent with justice and common sense  and an unreasonable construction  one leading to mischief or absurdity, the court should adopt the interpretation which is reasonable. (Lampley v. Alvares (1975) 50 Cal. App.3d 124, 128 [123 Cal. Rptr. 181].)
(1b) In other contexts, it is recognized that what is lawfully begun can become unlawful when for example, it exceeds the bounds of reasonableness, *804 when the conduct which would otherwise be lawful is engaged in for an improper purpose or when, as in this case, the original lawful purpose is replaced with or supplemented by an unlawful purpose. Thus in the area of search and seizure, for example, courts have recognized that what is begun as a lawful detention may become an unlawful search and seizure when the continued detention is no longer justified. (See generally People v. Thurman (1989) 209 Cal. App.3d 817 [257 Cal. Rptr. 517].) In In re Tony C. (1978) 21 Cal.3d 888 [148 Cal. Rptr. 366, 582 P.2d 957], the court held that in determining whether a street encounter between an officer and a citizen is lawful and in accordance with Fourth Amendment principles, the court should first determine the purpose of the encounter. (Id., at p. 895.) The courts have also recognized that if the purpose of a traffic stop or traffic arrest is merely a pretext to search for evidence of another offense, the stop or arrest is not lawful. (People v. Franklin (1985) 171 Cal. App.3d 627, 633 [217 Cal. Rptr. 529].) Similarly in the area of use of force by a police officer, an officer may use reasonable force to prevent escape or overcome resistance, but his conduct becomes unlawful when he uses excessive force. (People v. Coleman (1978) 84 Cal. App.3d 1016, 1021-1022 [149 Cal. Rptr. 134].)
In this context, an inmate may lawfully be restrained for the purpose of transporting her from one correctional facility to another. However, if the inmate for a period of time is also restrained for an unlawful purpose then the restraint for that time period becomes unlawful. Thus if a person such as defendant takes advantage of the fact of the inmate's lawful restraints and engages in acts for an improper purpose, such as sexual arousal or gratification, the inmate is unlawfully restrained during the illegal acts. Stated another way, in that situation, the officer has exceeded the scope of the permissible restraint and the restraint becomes unlawful.
Here, defendant employed the restraints[5] not for the sole purpose of transporting the two women but to enable him to commit sexual batteries against them. The restraints as so employed were therefore unlawful. As defendant does not otherwise contest his convictions, the convictions for sexual battery are valid.

MULTIPLE CONVICTIONS
(4a) Defendant next contends that he cannot be convicted of both sexual battery under section 243.4 and assault by a public officer acting under color of authority under section 149 because the latter is necessarily included in the former. Not so.
*805 (5) "`The test in this state of a necessarily included offense is simply that where an offense cannot be committed without necessarily committing another offense, the latter is a necessarily included offense.'" (People v. Pearson (1986) 42 Cal.3d 351, 355 [228 Cal. Rptr. 509, 721 P.2d 595].) (4b) Having stated the rule, it becomes readily apparent that assault by a public officer under color of authority is not a necessarily included offense in sexual battery for purposes of the rule against multiple convictions. While the two offenses contain some of the same elements, not all of the elements of assault by a public officer are present in the definition of sexual battery. Sexual batteries can be committed by individuals other than public officers and can be committed by public officers who are not acting under color of authority. Thus a person can commit a sexual battery without also necessarily violating section 149.[6]
(6) Defendant contends that assault by a public officer must be deemed a necessarily included offense of sexual battery because should defendant ever be convicted of an additional offense, each of the five prior convictions may be alleged as prior convictions for sentence enhancements resulting in multiple punishment for the same acts. Again we disagree. Section 654 would prevent alleging all of these convictions as prior convictions for sentence enhancements if one or more are based on the same act. (People v. Pearson, supra, 42 Cal.3d 351, 358.)

DISPOSITION
Judgment affirmed.
Dabney, Acting P.J., and Timlin, J., concurred.
Appellant's petition for review by the Supreme Court was denied January 22, 1992.
NOTES
[1]  Unless otherwise indicated, all further statutory references are to the Penal Code.
[2]  Defendant was charged with two counts of sexual battery (counts I and II) and one count of assault by an officer (count III) for these acts.
[3]  Defendant was charged with one count of sexual battery in count IV and one count of assault by an officer in count V for these acts.
[4]  Consistent with this argument, he also contends that the first victim, Mary L., was not restrained by him at all but rather by another correctional officer and there was no evidence that this other officer was defendant's accomplice.
[5]  In referring to "restraints" we mean not only the handcuffs and waistchains but also the act of placing the women in the van from which they could not exit.
[6]  We agree with defendant's contention that simple assault is a necessarily included offense of sexual battery. (People v. Carapeli (1988) 201 Cal. App.3d 589, 595 [247 Cal. Rptr. 478].) However, an assault under section 149 is a different crime than simple assault both in terms of definition and in terms of penalty. While simple assault may be a necessarily included offense to both sexual battery and assault by a public officer, that does not mean assault by a public officer is necessarily included in sexual battery.
