
26 Ill. App.2d 283 (1960)
168 N.E.2d 41
Lila Pressley, et al., Plaintiffs-Appellees,
v.
City of Chicago, a Municipal Corporation, et al., Defendants-Appellants.
Gen. No. 47,858.
Illinois Appellate Court  First District, Second Division.
June 14, 1960.
John C. Melaniphy, Corporation Counsel of the City of Chicago (Sydney R. Drebin, Assistant Corporation *284 Counsel, and Robert J. Collins, Special Assistant Corporation Counsel, of counsel) for appellants.
Kirkland, Ellis, Hodson, Chaffetz, and Masters, of Chicago (Joseph B. Fleming, John L. Bordes, and David R. MacDonald, of counsel) for appellees.
MR. JUSTICE BURMAN delivered the opinion of the court.
Defendants appeal from a decree perpetually enjoining them from interfering with plaintiffs' operation of certain devices for the sale of cigarettes.
There are two groups of plaintiffs. One group is composed of small individual restaurants, grill and tavern owners who are licensed to sell cigarettes at retail. They will hereafter be referred to as "store-keepers." The other group own cabinets containing (1) various brands of cigarettes in packages, and (2) a control unit containing a coin slot and coin receptacle, and this group will be referred to as "owners."
The complaint alleges that certain persons having devices identical with plaintiffs have been convicted of violating the cigarette vending machine ordinance and describes plaintiffs' mechanical devices. It alleges that a suit in equity is proper to avoid a multitude of suits, irreparable damages and that there is no adequate remedy at law; and that plaintiffs' devices are not within the meaning of Sections 178-19 to 178-24 of the Municipal Code. Defendants filed a motion for summary judgment supported by affidavit alleging in substance that there existed no genuine issue of any material fact. Plaintiffs also filed a motion for summary judgment. After a lengthy hearing the chancellor denied defendants' motion and granted plaintiffs' motion and the injunction issued.
It is the defendants' theory that plaintiffs' mechanical devices for the sale of cigarettes are manifestly *285 "cigarette vending machines" within the meaning of the Chicago ordinance regulating such machines. The relevant parts of the ordinance which was amended on June 30, 1954, and with which we are concerned, are as follows:
"178-19. Furnishing cigarettes to minors.) It is unlawful to sell or give away, or offer to sell or give away, any cigarettes or any cigarette papers or wrappers of any kind to any minor under eighteen years of age.
178-20. Cigarette-vending machine  definitions) `Cigarette-vending machine' means any mechanical container or device used or intended to be used for retail sales of cigarettes, the operation of which is governed or controlled by the deposit of a coin or token.
178-23. Restriction of location.) To promote the public health, safety, morals and general welfare, to prevent the sale of cigarettes to minors under eighteen years of age and to minimize the problems of enforcement under this ordinance, no cigarette-vending machine shall be installed or used any place except and save only rooms or areas of industrial, commercial and mercantile establishments to which members of the general public are not invited or do not have access and where such machines shall be available for the use and convenience of the employees of such establishments. Every such machine installed or used on premises where minors under the age of eighteen are employed shall be under the constant supervision and surveillance of a responsible adult."
The device in question consists of two mechanical units; (1) a cabinet containing various brands of cigarettes, (2) a "remote control" unit containing a coin slot and coin receptacle which is under the control of *286 the storekeeper and inaccessible to the customer but electrically connected to the cabinet.
In order to purchase cigarettes; (a) the customer requests a package of cigarettes from the storekeeper and tenders the purchase price to him; (b) the money is deposited by the storekeeper in the "remote control" device located behind the counter; (c) and the storekeeper presses a button which activates the cabinet containing cigarettes so that the customer may select a package of cigarettes.
The case principally relied on by defendants is that of Layne v. Oklahoma Tax Commission, 179 P.2d 683. There the customer deposited a coin in a coin receptacle box which caused contact with a switchboard. The patron then orally requested over a telephone wire that a certain musical number be played. The operator then made the necessary contact to produce the number desired. In a claim for refund of taxes collected under the juke box law the claimants contended that the legislature intended to include within the operation of the act only mechanical boxes which reproduce music within themselves upon deposit of a coin. And further, that since the manner of operation depended upon an intervening agency the placing of the coin does not within itself, produce any music. In the Layne case the purpose of the Oklahoma statute is to obtain a tax and the court there held that the "act of inserting a coin puts into operation the chain of occurrences which resulted in music being produced for the patron" and thus concluded that the operation was taxable.
[1] Defendants argue that the only issue presented to this court is the applicability of Chap. 178-20 to plaintiffs' mechanical devices. We cannot agree with this conclusion and hold that all pertinent parts of Chap. 178 must be construed together so as to give effect to the intention of the lawmakers. Sec. 19 provides *287 ... it is unlawful to sell cigarettes to minors under eighteen years of age; Sec. 23 provides ... to promote the public health, safety, morals and general welfare ... to prevent sale of cigarettes to minors ... "no cigarette vending machine shall be installed or used any place except areas of industrial, commercial and mercantile establishments to which members of the general public are not invited and where such machines shall be available for the use of employees. Every such machine used on premises where minors are employed shall be under the constant supervision of a responsible adult."
It is clear that the purpose of Chap. 178 is to control and regulate the sale of cigarettes, particularly with respect to minors as distinguished from the Layne case that involved a statute to obtain a tax. In the case at bar there is nothing which any customer can operate which will necessarily result in his obtaining cigarettes.
[2, 3] The object of construing an ordinance is to ascertain and give effect to the intention of the legislature. In seeking this intention the court will have regard to the object sought to be attained by the ordinance. (Smith v. County of Logan, 284 Ill. 163, 119 N.E. 932.) In Illinois Cigarette Service Co. v. City of Chicago, 89 F.2d 610 (7th Cir.1937), the court rejected the contention that fully automatic cigarette vending machines in which the customer deposits the coin and selects his cigarettes without the intervention of the storekeeper were not subject to regulation and prohibition and said "... The evil sought to be reached by forbidding the sale of cigarettes in automatic vending machines was the purchase of cigarettes by immature minors.... But to the inanimate machine it cannot speak.... The automatic vendor must sell to any and all who insert coins. It has no power of discrimination."
*288 The customer in the instant case does not deposit the coin. He must give his money to the storekeeper who can view him in the same manner he would if he sold cigarettes over the counter. The storekeeper then deposits the money in a slot as he would in a cash register and he activates the cigarette cabinet permitting the customer to obtain cigarettes.
[4] We are of the opinion that in the use of the device in question the storekeeper as licensee maintains the principle of the ordinance in imposing responsibility for selling cigarettes to minors, and the device does not act as a subterfuge to circumvent the ordinance provisions.
For the reasons stated the decree is affirmed.
Decree affirmed.
MURPHY, P.J. and KILEY, J., concur.
