delivered the opinion of the court:
Defendant Richard Manning appeals from the judgment of the Circuit Court of Will County, following a jury trial, in which he was convicted on two counts of unlawful possession of a controlled substance, and one count of burglary. The trial court entered judgment on two separate counts of unlawful possession of a controlled substance and, also, on the one count of burglary, and sentenced defendant to concurrent terms of not less than 4 nor more than 8 years on each of the possession convictions and not less than 1 year nor more than 5 years on the burglary conviction.
On appeal in this court, defendant contends that it was error for the trial court to enter judgment of conviction and sentence on the lesser offense of burglary since it arose from the same continuous course of conduct that resulted in the convictions for unlawful possession of controlled substances. Defendant also contends that it was error for the trial court to enter judgments of conviction and sentences on both of the two counts of unlawful possession of a controlled substance, since there was only a single act of possession and, consequently, only one crime. It appears from the record that during the early morning hours of May 15, 1975, following a burglar alarm call, police officers entered the Oseo portion of a Jewel-Osco retail store complex which was closed to business and separated from the Jewel section by a locked gate. The police found defendant inside the Oseo drug store. When he was searched, he was found to be in possession of an assortment of pharmaceutical pills and capsules, later determined to include 343.8 grams of amphetamines and 240.3 grams of barbiturates.
From the record it appears that the burglary arose from the *879same course of conduct as the unlawful possession offenses. Defendant had obviously either entered or secreted himself in the premises for the purpose of stealing items in the drug store. Under the precedent of People v. Lilly (1974), 56 Ill. 2d 493, 309 N.E.2d 1, the supreme court of this State determined that a person may not be convicted of multiple offenses which arise out of a single course of conduct. As we have noted in People v. Vaini (3d Dist. 1975), 33 Ill. App. 3d 246, 337 N.E.2d 234, the test of whether a single course of conduct constitutes multiple criminal offenses is whether the conduct is separable or whether the offenses are distinct and independently motivated. If the multiple offenses arise out of the same course of conduct, the conviction for the lesser offense must be reversed and judgment and sentence entered only on the most serious offense. (People v. Williams (1975), 60 Ill. 2d 1, 322 N.E.2d 819). It is not significant that the offenses involve different elements of proof. People v. Williams (1975), 60 Ill. 2d 1, 322 N.E.2d 819—armed robbery and burglary; People v. Johnson (1st Dist. 1975), 28 Ill. App. 3d 799, 329 N.E.2d 464 — rape, robbery and burglary.
In the instant case, obviously, defendant unlawfully remained on the premises for the purpose of stealing. There is no evidence in the record of independent motivation for the acts of burglary and possession of the drugs. Under the circumstances, therefore, it was error for the trial court to enter judgment of conviction and sentence on all three verdicts and, clearly, the conviction for the lesser offense of burglary should be vacated.
On the issue of whether the trial court properly entered judgments of conviction and sentences on the two counts of unlawful possession of a controlled substance, we conclude that there was apparently only a single uninterrupted act from the unlawful entry to the possession of drugs which, in fact, involved many items, totaling approximately 24 different groups of pharmaceutical pills. We have noted, although a variety of pharmaceutical substances may have been in possession, the possession all developed from a continuous transaction. We see such activity as an indivisible course of conduct, and, consequently, convictions of two offenses of possession arising out of a single course of conduct are not proper nor are separate sentences authorized. (People v. Lilly (1974), 56 Ill. 2d 493, 309 N.E.2d 1; People v. Cox (1972), 53 Ill. 2d 101, 291 N.E.2d 1; People v. Gibson (2d Dist. 1975), 30 Ill. App. 3d 555, 333 N.E.2d 549.) The test of whether a single course of conduct constitutes multiple criminal offenses is whether the respective elements of the conduct are separable or whether the offenses committed are distinct and independently motivated. People v. Vaini (3d Dist. 1975), 33 Ill. App. 3d 246, 337 N.E.2d 234; People v. Cobetto (5th Dist. 1975), 32 Ill. App. 3d 696, 336 N.E.2d 505.
*880As the supreme court stated in People v. Israel (1915), 269 Ill. 284, 109 N.E. 969, one act of theft was but one offense irrespective of the fact that the stolen property consisted of different kinds of property belonging to different individuals. The court emphasized that there is only one act fully completed at the same time and place and that it, therefore, results in one crime, however many different kinds of property may be stolen. Defendant here committed a criminal offense in taking pills and capsules from the drug store. We find nothing in the evidence which would support a conclusion that defendant committed independently motivated acts of possession as to each category of stolen drugs. There were no nonpharmaceutical prohibited substances found in his possession.
This case is not analogous to the situation where sales are made knowingly of multiple types of drugs. In that situation, there could be separate offenses because of independent motivation. The parties clearly know that they are handling specific separate transactions. There is nothing in the record to indicate that defendant desired to possess the drugs for the purpose of resale or delivery. It appears that if defendant had been so motivated, the heterogeneous assembly of brands and dosages would have been to his disadvantage since he could easily have taken a marketable quantity of differentiated substances by merely procuring a selection of entire bottles of drugs. It appears from the record that in the single, indivisible act, he simply seized a sampling of assorted drugs. There was no differentiation of the motley assortment of pharmaceuticals in the manner in which he possessed them, and there was no evidence that defendant possessed knowledge which would permit him to differentiate the substances found on or about his person. To rationalize a selective category of two classes of controlled substances as being knowingly selected is purely speculative and not based on anything in the record.
If defendant had been charged in 24 counts for the theft of 24 packets of drugs it would be absurd to contend that he should be convicted and sentenced on the 24 charges. This would be the logical consequence of the application of the theory advanced by the State to support the two controlled substances convictions. We, therefore, conclude that defendant engaged in only one course of conduct, that is, to possess drugs. As a consequence, defendant’s conduct constituted only one crime, and there should be only one judgment of conviction. People v. Holliman (2d Dist. 1974), 22 Ill. App. 3d 95, 316 N.E.2d 812.
For the reasons stated, therefore, the judgment of the Circuit Court of Will County convicting defendant of the offense of burglary is vacated and, likewise, the judgment and conviction in the circuit court and the sentence imposed as a consequence thereof involving the count charging defendant with possession of 200 grams or more of a derivative of *881barbituric acid in violation of section 402 of the Illinois Controlled Substances Act (Ill. Rev. Stat. 1973, ch. 56%, par. 1402(a)(5)) is likewise vacated. The conviction of defendant for unlawful possession of a controlled substance, being 200 grams or more of amphetamines, contrary to Ill. Rev. Stat. 1973, ch. 56%, par. 1402(a)(6), and the sentence imposed thereon of not less than 4 nor more than 8 years is affirmed.
Affirmed as to one conviction and sentence. Judgments of convictions and sentences for burglary and a second count of possession of controlled substances are vacated.
STOUDER, J., concurs.