
263 N.W.2d 751 (1978)
STATE of Iowa, Appellee,
v.
Patrick R. FURNALD, Appellant.
No. 60003.
Supreme Court of Iowa.
March 22, 1978.
Vern M. Ball of Ball Law Offices, Bloomfield, for appellant.
Richard C. Turner, Atty. Gen., Raymond W. Sullins, Asst. Atty. Gen. and Sidney E. Drake, County Atty., Centerville, for appellee.
*752 Considered by MOORE, C. J., and LeGRAND, REYNOLDSON, HARRIS, and McCORMICK, JJ.
REYNOLDSON, Justice.
The question this appeal presents is whether the crime of "criminal trespass," §§ 729.1 and 729.2, The Code, 1975, is a lesser included offense of the crime of breaking and entering, defined in § 708.8, The Code, 1975.
The State's evidence disclosed on April 8, 1976, old, rural "Hake's School" in Appanoose County was owned by Richard Gardner who used it for storage in his business of selling carpets, furnaces and air conditioners.
In late afternoon of that day Gardner's daughter attempted to enter the schoolhouse door and found it padlocked. After dark at about 8:00 p. m. Gardner, driving by the building, saw an unlighted pickup backed up to the open door in a loading position. Defendant's companion, Cortesio, came out of the schoolhouse. He stated he had been drinking and was urinating. Defendant then came out and later stood in front of the pickup license plate when Gardner tried to read the number. The latter was afraid to get out of his vehicle to see if anything was missing.
The next morning Gardner determined a roll of carpet had been dragged toward the doorway. There was no evidence anyone had urinated in the structure. The hasp holding the padlock was broken.
Cortesio was a witness for defendant. He testified he and defendant were drinking in a Centerville tavern in the afternoon, then purchased a 12-pack and started riding around. They stopped at Hake schoolhouse to urinate and went inside so as not to be seen when car lights approached. The door was open about 12 or 14 inches and Cortesio had to open it further to gain entrance.
Both before trial and and at close of evidence defendant requested trial court to instruct the jury on the offense of criminal trespass as a lesser included offense of the crime charged, § 708.8 breaking and entering. This request was refused.
The jury returned a verdict of guilty. Defendant was sentenced to imprisonment in the State Penitentiary at Fort Madison for ten years. Upon his appeal, we affirm.
I. At time of this trial authority for submission of lesser included offenses was found in two code sections. The first was § 785.5, The Code, 1975:
"Upon an indictment for an offense consisting of different degrees, the jury may find the defendant not guilty of the degree charged in the indictment, and guilty of any degree inferior thereto, or of an attempt to commit the offense, if punishable by indictment."
The second section is § 785.6, The Code, 1975:
"In all other cases, the defendant may be found guilty of any offense the commission of which is necessarily included in that with which he is charged in the indictment."
See State v. Redmon, 244 N.W.2d 792, 795-796 (Iowa 1976); State v. Billings, 242 N.W.2d 726, 730 (Iowa 1976). The gist of the above two sections now is included in rule 21, Rules of Criminal Procedure. See also § 701.9 (merger of lesser included offenses) and § 816.2 (prosecutions barred), Supplement to Code of Iowa, 1977.
Certain principles are applied to determine whether one crime is a lesser included offense in another. We examine the two crimes to determine if they are "of the same nature, or same species." State v. Stewart, 223 N.W.2d 250, 251 (Iowa 1974), cert. den., 423 U.S. 902, 96 S.Ct. 205, 46 L.Ed.2d 134 (1975).
Narrowing the focus to determine whether one offense is "necessarily included" within another, we apply two tests. The first is the legal or element test. The lesser offense must be composed solely of some but not all elements of the greater crime. The second, "factual" test is an ad hoc determination whether there is a factual basis in the record for submitting the included offense to the jury. State v. Stergion, 248 N.W.2d 911, 912 (Iowa 1976); *753 State v. Smith, 223 N.W.2d 223, 225 (Iowa 1974).
"In the court's opinion the statutes and not the accusatory pleading or charge must establish the essential elements of the offense charged. We therefore hold the statutory or legal element test should be the sole approach in determining what are the elements of the offense charged and that the language of the information or indictment charging the crime has no bearing on that analysis."State v. Redmon, supra, 244 N.W.2d at 801
Compare Comment, The Lesser Included Offense Doctrine in Iowa: The Gordian Knot Untied, 59 Iowa L.Rev. 684, 700 (1974).
The elements of the lesser offense must be "an elementary part of the greater offense." State v. Rosewall, 239 N.W.2d 171, 174 (Iowa 1976). It is quite possible to commit one crime in the act of committing another and yet not have it be an included offense. It is not included if its elements are not entirely included as a part of the elements of the major offense. State v. Habhab, 209 N.W.2d 73, 75 (Iowa 1973).
II. At times relevant here, § 708.8, The Code, 1975, provided:
"708.8 Other breakings and enterings. If any person, with intent to commit any public offense, in the daytime break and enter, or in the nighttime enter without breaking, any dwelling house; or at any time break and enter any office, shop, store, warehouse, railroad car, boat, or vessel, or any building in which any goods, merchandise, or valuable things are kept for use, sale, or deposit, he shall be imprisoned in the penitentiary not more than ten years, or be fined not exceeding one hundred dollars and imprisoned in the county jail not more than one year." (See present § 713.1, Supplement to the Code of Iowa, 1977)
The genesis of § 708.8, The Code, 1975, appears in the Code of 1851 where an almost indistinguishable version is found at § 2611.
Iowa's Criminal Trespass Act, Chapter 729, The Code, 1975, was not enacted until 1971. See Acts 64 G.A., Ch. 274. Simultaneously, the legislature repealed former § 746.4, The Code, 1971 ("If any tramp or vagrant, without permission, enter any schoolhouse or other public building * *") and former § 744.3, The Code, 1971 (evading admission fee to entertainments). The new enactment appeared in the following form in the Code of 1975:
"729.1 Criminal trespass. Definitions:

1. The term `property' shall include any land, dwelling, building, conveyance, vehicle, or other temporary or permanent structure whether publicly or privately owned.
2. The term `trespass' shall mean one or more of the following acts.
a. Entering upon or in property without legal justification or without the implied or actual permission of the owner, lessee, or person in lawful possession with the intent to commit a public offense or to use, remove therefrom, alter, damage, harass, or place thereon or therein anything animate or inanimate, without the implied or actual permission of the owner, lessee, or person in lawful possession.
b. Entering or remaining upon or in property without legal justification after being notified or requested to abstain from entering or to remove or vacate therefrom by the owner, lessee, or person in lawful possession, or the agent or employee of the owner, lessee, or person in lawful possession, or by any peace officer, magistrate, or public employee whose duty it is to supervise the use or maintenance of the property.
c. Entering upon or in property for the purpose or with the effect of unduly interfering with the lawful use of the property by others.
d. Being upon or in property and using, removing therefrom, altering, damaging, harassing, or placing thereon or therein anything animate or inanimate, without the implied or actual permission of the owner, lessee, or person in lawful possession.
"729.2 Penalty. Any person who shall knowingly trespass upon the property of *754 another is guilty of a public offense and upon conviction shall be punished by a fine not to exceed one hundred dollars or by imprisonment in the county jail for a term not to exceed thirty days.
"729.3 Damage or injury. Any person committing a trespass as defined in section 729.1 resulting in injury to any person or damage in an amount of more than one hundred dollars to anything, animate or inanimate, located thereon or therein shall be punished by a fine not to exceed three hundred dollars or by imprisonment in the county jail not to exceed six months or by both such fine and imprisonment." (See present § 716.1, Supplement to the Code of Iowa, 1977)
Historically, there is a logical inference Chapter 729 was enacted at least in part to cope with the destructive fallout of the demonstrations and protests which commenced in the 1960's. Cf. State v. Williams, 238 N.W.2d 302 (Iowa 1976).
A preliminary overview convinces us our criminal trespass act is not "of the same nature or same species" as our § 708.8 breaking and entering statute, State v. Stewart, supra, 223 N.W.2d at 251, nor was it intended to be "an elementary part of the greater offense." State v. Rosewall, supra, 239 N.W.2d at 174.
Studying the § 708.8 language relevant to this incident, the offense is one against the building. State v. Ferguson, 149 Iowa 476, 479, 128 N.W. 840, 842 (1910). The building must be one in which "goods, merchandise or valuable things are kept for use, sale or deposit." State v. Jennings, 79 Iowa 513, 514, 44 N.W. 799, 799 (1890); see State v. Burns, 190 Iowa 6, 8, 179 N.W. 843, 844 (1920), overruled on other grounds, State v. Frey, 206 Iowa 981, 988, 221 N.W. 445, 448 (1928). The offense involves an intent to commit larceny. Id. The legal elements here relevant would require State to show:
(1) defendant either alone or in company with another, did break and enter the schoolhouse building;
(2) the building was then in use, possession and control by another as a place in which goods, merchandise or valuable things were kept for use, sale or deposit; and
(3) it was the intention of defendant in breaking and entering the building to commit the crime of larceny therein.
State v. Christofferson, 215 Iowa 1282, 1285, 247 N.W. 819, 821 (1933).
It is readily apparent the dragnet language of the criminal trespass act, §§ 729.1 and 729.2, cannot be tortured and compressed to describe an offense necessarily included in § 708.8.
Section 729.2 provides "any person who shall knowingly trespass upon the property of another is guilty of a public offense * * *." But "property" as used in this statute includes land. § 729.1(1). The § 729.2 element of entry upon land cannot be an element of a § 708.8 crime. Thus it cannot be said the elements of the "lesser" offense are entirely included as a part of the elements of the major offense. State v. Redmon, supra, 244 N.W.2d at 796; State v. Smith, supra, 223 N.W.2d at 225-226; see State v. Stergion, supra, 248 N.W.2d at 912-913.
Our conclusion is not swayed by defendant's argument we have defined "breaking," as the making of an opening in a building by "trespass" which occurs when an intruder removes or puts aside some part of the structure relied on as an obstruction to intrusion. See State v. Clay, 213 N.W.2d 473, 480 (Iowa 1973); State v. Hougland, 197 N.W.2d 364, 365 (Iowa 1972). We there used the word "trespass" in its ordinary sense to signify the intruder was uninvited or operating without consent. We think it apparent we did not intend to invoke all the legal concepts inherent in §§ 729.1 and 729.2, The Code, 1975.
Trial court was right in refusing to instruct on the alleged lesser included offense. We affirm the judgment below.
AFFIRMED.
