
71 Wn. App. 634 (1993)
861 P.2d 492
THE STATE OF WASHINGTON, Respondent,
v.
JOHN WAYNE THOMSON, Appellant.
No. 14391-7-II.
The Court of Appeals of Washington, Division Two.
November 12, 1993.
John A. Hayes, for appellant (appointed counsel for appeal).
C.C. Bridgewater, Prosecuting Attorney, for respondent.
MORGAN, J.
John Wayne Thomson appeals his conviction for first degree rape. We vacate the judgment and remand for resentencing on second degree rape.
*636 T., an adult female, lived in a house in Cowlitz County, Washington. The house had several rooms, one of which was her bedroom. Her bedroom was equipped with a lock on the door.
T. met Thompson during the evening of July 6, 1990. During the early morning hours of July 7, she invited him to her house. Apparently, they went to the house and entered it together. He then made sexual advances, which T. rebuffed. However, she said he could sleep in a guest bedroom. She then went into her bedroom and locked the door.
At this point in time, according to the stipulated facts, Thomson was licensed or invited to be in certain areas of the home, including the living room, kitchen, bathroom, and guest bedroom. He had no license, invitation or privilege to enter T.'s bedroom.
Later that night, Thomson broke through T.'s bedroom door and forcibly compelled her to have sexual intercourse. She resisted, but her efforts failed.
The State charged Thomson with first degree rape committed in violation of RCW 9A.44.040(1)(d). RCW 9A.44.040 provides in pertinent part:
(1) A person is guilty of rape in the first degree when such person engages in sexual intercourse with another person by forcible compulsion where the perpetrator or an accessory:
....
(d) Feloniously enters into the building or vehicle where the victim is situated.
At a bench trial on stipulated facts, the trial court found that Thomson had engaged in sexual intercourse with T. by forcible compulsion, and that he had feloniously entered into a building in which T. was situated. Thus, it convicted him of first degree rape.
On appeal, Thomson acknowledges that he forcibly compelled T. to have sexual intercourse, and that he therefore is guilty of second degree rape. He denies, however, that he feloniously entered a building in which T. was situated. Thus, he says, he is not guilty of first degree rape.
*637 The issue, then, is whether Thomson feloniously entered a building in which T. was situated. We analyze the concept of felonious entry into a building, then apply it to the facts of this case.

I
Tautologically, felonious conduct is any conduct that constitutes a felony. Because there are many kinds of felonies, there are also many kinds of felonious conduct.
One kind of felonious conduct is felonious entry. Felonious entry is entry that is burglarious, as opposed to entry that is lawful or trespassory. RCW 9A.52.020-.030; RCW 9A.52.070-.080.
Another kind of felonious conduct is felonious remaining. Felonious remaining is remaining that is burglarious, as opposed to remaining that is lawful or trespassory. RCW 9A.52.020-.030; RCW 9A.52.070-.080.
The difference between felonious entry and felonious remaining can be seen by examining State v. Collins, 110 Wn.2d 253, 751 P.2d 837 (1988). In that case, two elderly women invited the defendant into the living room of their home so he could use the phone. After he hung up, he dragged both women into a bedroom, where he raped one and assaulted the other. He was convicted of rape in the second degree, assault in the second degree, and burglary in the first degree. Only the burglary conviction reached the Supreme Court.
The Supreme Court differentiated between entry and remaining. It said the issue was not whether the defendant had unlawfully entered the women's home in the first instance, but rather whether he had unlawfully remained therein. 110 Wn.2d at 256 n. 1. Because the charge was burglary, and because burglary is a felony, the court could just as well have said that the issue was not whether the defendant had feloniously entered the women's home, but rather whether he had feloniously remained therein.
Apparently, the reason felonious entry was not in issue was that the defendant had not engaged in conduct of that sort. Entry into a building is burglarious, and therefore felonious, if *638 it is unlawful and made with intent to commit a crime therein. RCW 9A.52.030. Entry into a building is unlawful if made without invitation, license or privilege. RCW 9A.52.010(3). Collins had initially entered the women's home by invitation and, as far as the evidence showed, without intent to commit a crime. 110 Wn.2d at 256 n. 1. Thus, his initial entry was not felonious, burglarious or unlawful, and it was not the issue in the case.
Although felonious entry was not in issue, felonious remaining was. According to numerous authorities, Annot., Maintainability of Burglary Charge, Where Entry Into Building Is Made With Consent, 58 A.L.R.4th 335 §§ 2, 4-5, 11-12 (1987), a defendant's invitation to enter a building can be expressly or impliedly limited as to place or time,[1] and a defendant who exceeds either type of limit, with intent to commit a crime in the building, engages in conduct that is both burglarious and felonious.[2]See also, RCW 9A.52.010(3), second paragraph (recognizing implied limitation as to place); State v. Rio, 38 Wn.2d 446, 230 P.2d 308 (express *639 limitation as to place), cert. denied, 342 U.S. 867 (1951).[3] Consistent with these authorities, the State argued that Collins' invitation to enter the home had been subject to implied limitations; that he had exceeded those limitations; that he had done so with intent to commit a crime; and that as a result he had burglariously and feloniously remained in the women's home.
The Supreme Court agreed at least on the basis of an implied limitation as to place. The court held that the record was sufficient to support an inference that Collins had been invited into the living room, but not into other parts of the house. 110 Wn.2d at 261. It appears to have recognized that the record was also sufficient to support inferences (1) that Collins exceeded the invitation's limit as to place when he dragged the women into a bedroom, and (2) that at that time, Collins' intent was to commit crimes in the building. It concluded that Collins' conduct constituted burglarious, i.e., felonious, remaining.[4]
*640 The Supreme Court also may have agreed on the basis of an implied limitation as to time.[5] It appears to have held or recognized that the record was sufficient to support inferences (1) that Collins had been invited into the home for the sole purpose of using the phone, 110 Wn.2d at 255, 261; (2) that once he had finished with the phone, his invitation expired, 110 Wn.2d at 255; and (3) that he remained in the house with intent to commit crimes therein. Apparently for this reason also, it concluded that Collins' conduct constituted burglarious, i.e., felonious, remaining. 110 Wn.2d at 255.
In finding that the record supported implied limitations as to place and time, the Supreme Court considered the purpose of the invitation as an important factor from which to infer the existence of implied limitations concerning place and time. It is not clear whether the court also held that conduct within an invitation's limits as to place and time constitutes unlawful or felonious remaining, merely because it exceeds the purpose for which the victim extended the invitation.[6]
[1, 2] Collins' significance here is that it illuminates the difference between felonious entry and felonious remaining. It shows that felonious entry occurs when a person initially enters a building without invitation, license or privilege, and with intent to commit a crime therein. RCW 9A.52.030(1); RCW 9A.52.020(1); RCW 9A.52.010(3). It shows that felonious remaining occurs when (1) a person has lawfully entered a building pursuant to invitation, license or privilege; (2) the *641 invitation, license or privilege is expressly or impliedly limited; (3) the person's conduct violates such limits; and (4) the person's conduct is accompanied by intent to commit a crime in the building. RCW 9A.52.030(1); RCW 9A.52.020(1); RCW 9A.52.010(3); State v. Collins, supra; State v. Rio, supra.

II
With this understanding of felonious entry, we now analyze whether Thomson feloniously entered a building in which T. was situated. In the first part of our analysis, we discuss whether T.'s house was a building and whether Thomson feloniously entered it or any part of it. In the second part of our analysis, we discuss whether T.'s bedroom was a "building" separate from the house.

A

THE HOUSE
It is undisputed that T.'s house was a building. RCW 9A.04.110(5). The question, then, is whether Thomson feloniously entered her house.
This question has two parts. First, did Thomson feloniously enter the house when he first arrived there in T.'s company? The record shows that she invited him in, and they entered together. The record does not show that he harbored criminal intent at that time. It follows that he did not enter the house feloniously at that time.
Second, did Thomson feloniously enter the house when, later in the night, he broke into T.'s locked bedroom? The record shows that Thomson had initially entered the house lawfully, pursuant to T.'s invitation; that T.'s invitation was limited in such a way as not to include her bedroom; that Thomson violated this limit when he broke into the bedroom; and that he broke into the bedroom with intent to commit a crime therein. For the reasons set forth above, the conduct shown by these facts is felonious remaining, as opposed to felonious entry. Thus, Thomson feloniously remained in the house when he entered T.'s bedroom, but he did not feloniously enter the house at that time.


*642 B

THE BEDROOM
It is undisputed that Thomson acted feloniously when he entered T.'s bedroom in the middle of the night. He had no invitation, license or privilege to enter, and he entered with intent to commit a crime therein.
The question, then, is whether T.'s bedroom constituted a "building" separate from the house. The State says yes; Thomson says no.
RCW 9A.04.110(5) defines the word "building" for purposes of Washington's criminal law. It provides:
"Building", in addition to its ordinary meaning, includes any dwelling, fenced area, vehicle, railway car, cargo container, or any other structure used for lodging of persons or for carrying on business therein, or for the use, sale or deposit of goods; each unit of a building consisting of two or more units separately secured or occupied is a separate building ...[.]
(Italics ours.)
Both sides rely on the second part of this statute, which we have italicized. The State says that "a building consisting of two or more units" is any building in which at least one room happens to be separately locked or occupied at the time of a crime. It further says that because T.'s bedroom was separately secured and occupied at the time of the crime here, T.'s bedroom was both a "unit" of her house and a separate building.
In contrast, Thomson says that "a building consisting of two or more units" is not just any building in which at least one room happens to be separately secured or occupied at the time of a crime. Rather, he says, "a building consisting of two or more units" is a building occupied or intended to be occupied by different tenants separately, for example, a hotel, apartment house, or rooming house. Cf. State v. Demos, 94 Wn.2d 733, 739, 619 P.2d 968 (1980) (crime occurred in rooming house). He asserts that because T.'s house was wholly occupied by her, her bedroom could not constitute a "unit" or a separate building within the meaning of RCW 9A.04.110(5).
As used in RCW 9A.04.110(5), the phrase "a building consisting of two or more units" is ambiguous. It might mean any *643 building in which at least one room happens to be separately secured or occupied at the time of a crime. On the other hand, it might mean only those buildings in which two more rooms are occupied or intended to be occupied by different tenants separately. Either meaning encompasses buildings such as hotels, apartment houses and rooming houses, but only the former encompasses a house, such as T.'s, that is wholly occupied by one person or one family.
[3] When a statute is ambiguous, we must ascertain the intent of the Legislature. State v. Johnson, 119 Wn.2d 167, 172, 829 P.2d 1082 (1992); State v. Elgin, 118 Wn.2d 551, 555, 825 P.2d 314 (1992). Here, we do that by examining the history of RCW 9A.04.110(5).
RCW 9A.04.110(5) was preceded by former RCW 9.01.010(17) and (18). Both were enacted in 1909. Laws of 1909, ch. 249, § 51(17)-(18). Former RCW 9.01.010(17) provided:
The words "dwelling house" shall include every building or structure which shall have been usually occupied by a person lodging therein at night, and whenever it shall be so constructed as to consist of two or more parts or rooms occupied or intended to be occupied, whether permanently or temporarily, by different tenants separately by usually lodging therein at night, or for any other separate purpose, each part shall be deemed a separate dwelling house of the tenant occupying the same.
Former RCW 9.01.010(18) provided:
The word "building" shall include every house, shed, boat, water craft, railway car, tent or booth, whether completed or not, suitable for affording shelter for any human being, or as a place where any property is or shall be kept for use, sale or deposit.
As can be seen, these statutes provided that the parts of a building would be deemed separate buildings when "occupied or intended to be occupied ... by different tenants separately."
The Legislature enacted RCW 9A.04.110(5) in 1975, as part of a comprehensive new criminal code. At that time, it had before it a precursor code known colloquially as the Orange Code and officially as the proposed Revised Washington Criminal Code (Dec. 3, 1970, version). See State v. *644 Thompson, 88 Wn.2d 13, 25 n. 5, 558 P.2d 202 (Utter, J., dissenting), appeal dismissed, 434 U.S. 898 (1977); State v. Simmons, 30 Wn. App. 432, 436 n. 3, 635 P.2d 745 (1981), review denied, 97 Wn.2d 1007 (1982). The Orange Code included § 9A.52.005(1) in its chapter on burglary. That section stated:
"[B]uilding, in addition to its ordinary meaning, includes any structure, vehicle, railway car, aircraft, or watercraft used for lodging of persons or for carrying on business therein; each unit of a building consisting of two or more units separately secured or occupied is a separate building ...[.]
Moreover, the drafters' commentary stated:
Finally, as a minimum, the property entered must be a building, as defined in section 9A.52.005(1). This definition is similar to that found in RCW 9.01.010(18). The second part of the new definition concerning multi-unit buildings is consistent with a similar provision in the definition of "dwelling house" found in RCW 9.01.010(17)[,] see also, State v. Rio, 38 Wn.2d 446, 450, 230 P.2d 308 cert. denied, 342[] U.S. 867 (1951).
(Italics ours.) Orange Code, at 214. According to this commentary, the second part of § 9A.52.005(1) was drafted to apply to "multi-unit buildings", or, in the language of former RCW 9.01.010(17), to buildings having two or more rooms "occupied or intended to be occupied ... by different tenants separately".
[4, 5] The second part of RCW 9A.04.110(5) is identical to what had appeared in the Orange Code as the second part of § 9A.52.005(1). Thus, it appears that the Legislature took the second part of RCW 9A.04.110(5) from the Orange Code. That being true, it is fair to infer that the Legislature intended, as the Orange Code's commentary stated, that the second part of RCW 9A.04.110(5) apply to buildings in which two or more rooms were occupied or intended to be occupied by different tenants separately.
It is not hard to discern why the Legislature intended this result. Suppose a house wholly occupied by one family (i.e., by a single owner or tenant). The family consists of two parents and three children. The house has four bedrooms. One bedroom is occupied by the parents, while each of the *645 other three is occupied by a different child. One night, someone breaks into all four bedrooms and steals property from each.
Additionally, suppose a multi-unit structure such as a hotel, apartment house or rooming house. It has a number of guest rooms, each occupied by a different tenant. One night, someone breaks into four of the guest rooms and steals property from each.
In each situation, there are two possible approaches to the term "building". The first approach is to characterize each burglarized room as part of the overall structure in which it exists; the result is one "building" and one burglary. The second approach is to characterize each burglarized room as a separate "building"; the result is four "buildings" and four burglaries.
At least arguably, the first approach better reflects the interests involved in the house, while the second approach better reflects the interests involved in the multi-unit building. In the situation involving the house, each family member has a privacy interest in the entire house, and that interest is not different from the interests of other family members. Thus, it makes sense to characterize the burglarized rooms as parts of a single building. In the situation involving the multi-unit structure, each tenant has a privacy interest in his or her room or apartment, and that interest is separate from the interests of other tenants. Thus, it makes sense to characterize the burglarized rooms as separate "buildings". The second part of RCW 9A.04.110(5) mandates the second approach, so it is not surprising that the Legislature intended it to apply to multi-unit buildings such as hotels, apartment houses and rooming houses, but not to dwellings wholly occupied by a single tenant.
Even if we were unable to ascertain legislative intent, the rule of lenity would lead us to the same construction of the statute. The rule of lenity provides that ambiguity in a criminal statute should be resolved in favor of the defendant. State ex rel. McDonald v. Whatcom Cy. Dist. Court, 92 Wn.2d 35, 37-38, 593 P.2d 546 (1979). Here, then, it indicates that *646 RCW 9A.04.110(5) should be construed as applying to multi-unit buildings in which two or more rooms are occupied or intended to be occupied by different tenants separately, but not to dwellings wholly occupied by a single tenant.
In this case, T.'s house was not occupied or intended to be occupied by different tenants, notwithstanding that she had invited Thomson to spend the night as a social guest. Rather, her house was a single-family dwelling wholly occupied by her. Thus, the second part of RCW 9A.04.110(5) did not cause any part of the house to be a separate "building", and Thomson did not enter a "building", feloniously or otherwise, when he broke into the bedroom.
We reduce the conviction to second degree rape and remand to the trial court for resentencing.
ALEXANDER, C.J., and SEINFELD, J., concur.
NOTES
[1]  The cited annotation mentions not only place and time, but also purpose. We omit purpose for reasons discussed below.
[2]  This is easily illustrated by the common situation in which a store is open to the public. Unless expressly excluded, a member of the public is invited to enter the public areas of the store for so long as the store is open. However, he or she exceeds the invitation's limit as to place by intruding into private areas of the store, RCW 9A.52.010(3) (license or privilege to enter or remain in building partly open to public is not license or privilege to enter or remain in parts of the building not open to public); People v. Mackabee, 214 Cal. App.3d 1250, 263 Cal. Rptr. 183 (1989) (office space separated from open lobby by waist-high counter); Dakes v. State, 545 So.2d 939 (Fla. Dist. Ct. App. 1989) (store open, but storeroom closed and restricted); Dixon v. State, 165 Ga. App. 133, 299 S.E.2d 608 (1983) (store open, but office private); State v. Vowell, ___ Hawaii App. ___, 837 P.2d 1308 (nightclub open, living quarters private), cert. denied, 843 P.2d 144 (1992); Bailey v. State, 493 N.W.2d 419 (Iowa Ct. App. 1992) (truck stop open, office private); State v. Sanchez, 105 N.M. 619, 735 P.2d 536 (Ct. App.) (store open, office private), cert. denied, 105 N.M. 618 (1987); Williams v. State, 796 S.W.2d 793 (Tex. Ct. App. 1990) (shop open, storeroom closed and restricted); Evans v. State, 677 S.W.2d 814 (Tex. Ct. App. 1984) (office area of clothing store); Johnson v. State, 664 S.W.2d 420 (Tex. Ct. App. 1983) (closed pharmacy area of open supermarket), and he or she exceeds the invitation's limit as to time by hiding in the store's public area until after the store is closed. State v. Walters, 604 So.2d 184 (La. Ct. App. 1992), writ denied, 610 So.2d 797 (La. 1993).
[3]  Rio was decided under statutes different from those in effect today. However, the court described the principle under discussion here when it said:

The area to which the appellant had free access was limited, and the fact that the appellant was living in one part of the premises does not establish such a right in the dwelling as to preclude his prosecution and conviction for the burglary of another part.
It is a general principle of law that,
"... if a servant, guest, or other person, being lawfully in a house, enters a room which he has no right to enter, with felonious intent, by breaking or opening an inner door, it is as much burglary as if he had entered by breaking an outer door or window."
38 Wn.2d at 451 (quoting former 12 C.J.S. 675, § 6).
[4]  Incidentally, felonious entry parallels this kind of felonious remaining. With felonious entry, a person leaves an area where he or she has a right to be (outside the building) and intrudes into an area where he or she has no right to be (inside the building), with intent to commit a crime therein. With this kind of felonious remaining, a person goes from an area where he or she has a right to be (the part of a building into which he or she has been invited) into an area where he or she has no right to be (the part of a building into which he or she was not invited), with intent to commit a crime therein.
[5]  Incidentally, the court recognized that a limitation as to time could arise at the outset, as part of the initial invitation, or later, by revocation of the invitation. 110 Wn.2d at 258, 261.
[6]  It appears to us that the Collins court was not asked to consider whether the purpose of an invitation is an independent limitation on the scope of the invitation, analogous to limitations on place and time, or, in the alternative, whether the purpose of an invitation is simply a factor from which limitations as to place and time may be inferred. Collins had exceeded the limits of his invitation as to place and time, and thus was guilty of felonious remaining (i.e., of burglary) regardless of whether he had also exceeded the victims' purpose.
