The opinion of the court was delivered by
Robert E. Esrey and Company d/b/a Park South Apartments appeals from a Shawnee County District Court decision which upheld an order of the defendant Floyd H. Dibbern requiring certain doors to be replaced in the Park South Apartment complex in Topeka. Mr. Dibbern was the state fire marshal at the time and the order was issued by him in that capacity. The order directed that the sliding glass doors in four of the buildings located within the complex be replaced by hinged swinging doors. The fire marshal’s determination that the existing sliding doors constituted a distinct hazard to life or property and his *785order of replacement were appealed to the district court pursuant to K.S.A. 1979 Supp. 31-142.
The Topeka Fire Department inspected the Park South Apartments after receiving a complaint from Sherry Chatham. Ms. Chatham’s complaint originated after she was locked in or out of her apartment several times due to the accumulation of ice in the runner at the base of the sliding glass door. This door was the only entrance to her apartment and, as a result of the blockage caused by freezing ice, Ms. Chatham was confined to her apartment on one occasion for twenty-four hours. Ms. Chatham had no telephone and finally got help by attracting the attention of a passerby.
Upon inspection, Mr. Darrell B. Dibbern, of the Topeka Fire Department, Fire Prevention Bureau, found that the sliding glass doors were the only means of ingress and egress to sixty-eight apartments located in four buildings of the Park South Apartment complex. The buildings will be referred to by their numerical addresses as 3720, 3730, 3740 and 3750. Mr. Dibbern notified appellant that since the doors created a distinct hazard to life and property and were not in compliance with K.S.A. 1979 Supp. 31-133 and regulations adopted thereunder, they were to be replaced in all sixty-eight apartments by hinged swinging doors.
On May 2, 1979, an administrative hearing was held, at the request of appellant, before Paul Markley, a hearing officer from the state fire marshal’s office, to consider the validity of the fire department request. Mr. Markley upheld the findings of the fire department and plaintiff appealed that determination to the district court. As the sufficiency of the evidence to justify the fire marshal’s order is an issue on appeal, the evidence presented before Mr. Markley and reviewed by the district court will be set forth in some detail.
Ms. Chatham testified that her door had frozen several times and several other tenants had experienced similar problems. On one occasion she obtained help from the fire department to gain entry to her apartment. On other occasions she was assisted by other tenants or by apartment maintenance people to gain entry into or escape from the apartment. She is a rather small woman and when her door would freeze she did not have sufficient strength to force the door open. She had no telephone and when frozen in she could only obtain help by attracting the attention of *786passersby or other tenants. As previously stated, she was confined on one occasion for nearly twenty-four hours. She furnished names and instances of others who had also experienced frozen doors.
Gary Oyler, a Topeka fireman, testified that on one occasion he assisted Ms. Chatham in gaining entrance to her apartment when her door was frozen shut.
Arlene Stramel, an employee of plaintiff for approximately seventeen years, was called as a witness by both parties. At the time of the hearing Ms. Stramel was the manager of the apartment complex and prior to becoming manager had been assistant manager. She produced records of the number of complaints that had been received about freezing doors. The apartments were constructed in 1965 and the records indicated one complaint in building 3720 in 1977, one complaint in building 3730 in 1975, two in 1977 and six in 1979. The complaints about building 3730 included one at apartment # 2, two at apartment # 9, four at apartment # 10, and one at apartment # 16. Ms. Chatham occupied apartment # 10 and one of her complaints involved a stuck door not due to freezing. Ms. Stramel acknowledged there could have been other occurrences of frozen doors but if they were not reported to the office she would have no record of them. There had never been any complaints of frozen doors in buildings 3740 and 3750. She testified there were sixty-eight apartments in the four buildings which have a sliding door as the only means of access and egress. The apartment complex had a total of two hundred thirty-four apartments but the others open into a central hallway by conventional hanging doors. The original work orders reflecting the complaints and the action taken thereon were received in evidence along with numerous photographs of the buildings and the apartment door of Ms. Chatham.
Darrell Dibbern, a Topeka fire inspector with the fire department, investigated the complaint filed with the city by Ms. Chatham. He interviewed Ms. Chatham, inspected her door in February, 1979, and observed ice and snow in the metal tracks of the door on the outside and an accumulation of thick ice on the inside of the door. He determined the apartments had only one means of access and noticed the other doors in the four buildings were identical to the one at Ms. Chatham’s apartment. He testified that under the regulations and portions of the national fire *787protection association life safety code adopted by the state fire marshal, the apartments were required to have at least one swinging door as a means of access and egress. He did not examine or closely inspect the doors on any of the other apartments. Based upon Ms. Chatham’s complaint and his interpretation of the life safety code and Kansas statutes, he determined “a distinct hazard to life could exist with the only means of egress being by sliding doors.” He applied that determination to all sixty-eight apartments in the four buildings. Plaintiff was directed to replace all sixty-eight sliding doors with “side-hinged swinging type” doors.
Floyd H. Dibbern, the state fire marshal, testified in his own behalf. He is a high school graduate and not trained as an engineer. Darrell Dibbern is his son. He had no personal knowledge of the problems at the Park South Apartments and merely accepted his son’s report and made a determination the sliding doors created a severe life safety hazard. He ordered the doors changed to the swinging type. His order was based upon the investigation and report of his son and upon a determination swinging doors were required by the life safety code adopted by the regulations of the fire marshal’s office. He testified he had gone to the apartment complex but only to verify that there were sliding glass doors. The doors did not meet the requirements of the code and therefore, in his opinion, constituted a distinct life safety hazard.
Next, plaintiff called Noland Paul Landry, employed by the city of Topeka as a building inspector in the building inspection department. He had been with the department nineteen years, reviewed the original plans for buildings 3720, 3730, and 3740, and identified copies of the building permits issued in 1965. The four apartment buildings, including the sliding doors, complied with the Topeka building code as it existed at the time of construction.
Plaintiff’s final witness was Donald G. Dressier, a professional consulting engineer from the greater Kansas City area. He holds a B.S. degree in civil engineering from Kansas State University, is licensed as a professional engineer in Kansas, Missouri, Delaware and Pennsylvania. He was amply qualified to testify as an expert. At the request of the plaintiff he made an inspection of apartment # 10 in building 3730. It was a detailed inspection of the sliding *788door problems at that apartment and was conducted from both the outside and the iriside. Mr. Dressier found that due to drainage from the east and the existing soil conditions, building 3730 had settled on the west side allowing cold air to infiltrate around the door. Interior moisture would then condense on the inside of the door and in cold weather would turn to ice and freeze the door shut. The settling of the building with the resultant interior moisture problem coupled with the extremely cold temperatures during January and February, 1979, combined to create Ms. Chatham’s problem. Uriless corrected, reoccurrences could be expected in cold weather. Mr. Dressier testified that modern day sliding doors are available which would eliminate the problem when combined'with repairs to the entranceway to eliminate the infiltration of the outside air which was causing the interior moisture to condense and freeze. On the day of his inspection in April, 1979, the interior and exterior temperatures at the door were the same, forty-two degrees, and the interior should be considerably warmer in winter. The entire western side of the building is settling but is worse in the areas of apartments 9 and 10. In addition to correcting the results of the settling problem so the doors do not become “scrunched,” he recommended the doors be replaced with “a quality well-insulated infiltration sliding glass door” of the type manufactured by Anderson or Pella. If this were done he was of the opinion the problem would be corrected and there would be no hazard to the tenants and occupants. He was further of the opinion that under some conditions a hinged swinging door would be less satisfactory and more hazardous than a quality sliding door. It was also his opinion that the installation of swinging doors would ruin the architectural integrity of the buildings. He did not inspect or examine any other doors except those at apartments 9 and 10 and did not inspect the other buildings. His inspection of the door at apartment 9 was incidental to the inspection at 10 and was only from the exterior as he was examining the immediate area of Ms. Chatham’s apartment. Apartment # 9 is next door to # 10. He did not inspect and had no knowledge whether the other buildings were affected by settling. He was specifically retained to examine the problem with apartment 10 in building 3730 and not for any other purpose. During the same winter Mr. Dressler’s own sliding door froze shut and he replaced it with a modem quality sliding *789door and eliminated his problem. The winter of 1978-79 was the worst winter in forty years.
The district court found the evidence to be sufficient to support the order of the fire marshal and plaintiff has appealed. The case was transferred from the Court of Appeals to this court under K.S.A. 1979 Supp. 20-3017. This court’s scope of review is the same as the district court’s when an administrative tribunal’s order is on appeal. On appeal, the court may not substitute its judgment for that of the administrative tribunal, but is restricted to considering whether as a matter of law:
(1) the tribunal acted fraudulently, arbitrarily or capriciously;
(2) the order is substantially supported by evidence, and
(3) the tribunal’s action was within the scope of its authority.
See Kansas State Board of Healing Arts v. Acker, 228 Kan. 145, Syl. ¶ 8, 612 P.2d 610 (1980); and Kansas State Board of Healing Arts v. Foote, 200 Kan. 447, 436 P.2d 828 (1968).
Appellant raises three issues on appeal:
1. The order appealed from is not substantially supported by sufficient evidence so as to apply to all sixty-eight apartments.
2. The state fire marshal acted arbitrarily, capriciously and fraudulently.
3. The state fire marshal acted outside the scope of his authority.
We will first direct our attention to appellant’s third point on appeal. K.S.A. 31-137 provides for the enforcement of the fire safety and prevention act, K.S.A. 31-132 et seq., as amended and supplemented. K.S.A. 31-137 provides in part:
“The state fire marshal, his deputies, the chief of any organized fire department of any municipality . . . shall enforce the provisions of this act and any rules and regulations adopted pursuant thereto.”
As will be shown subsequently, the statutes specifically provide the state fire marshal shall regulate the construction and maintenance of exits from apartment buildings. Appellant’s argument is that the fire marshal acted outside his powers in entering an order which appellant contends is too broad in scope. The crux of the argument really goes to the sufficiency of the evidence and not to the authority of the fire marshal. It is clear that he was acting within the scope of his authority as mandated by the statutes and the point is without merit.
*790We now turn to the more difficult determination of whether the determination and order of the fire marshal are substantially supported by the evidence and whether his action was arbitrary, capricious or fraudulent. The defendant relies primarily upon a regulation (K.A.R. 22-12-1, now K.A.R. 1980 Supp. 22-3-1), which adopted by reference portions of the national fire protection association life safety code.
K.S.A. 1979 Supp. 31-133 provides in pertinent part:
“31-133. Same; rules and regulations for safeguarding life and property from fire and explosion; mandatory requirements, (a) The state fire marshal shall adopt reasonable rules and regulations, consistent with the provisions of this act, for the safeguarding of life and property from the hazards of fire and explosion. Such rules and regulations shall include but not be limited to the following:
(3) The construction, maintenance and regulation of exits and fire escapes from buildings and all other places in which people work, live or congregate from time to time for any purpose, including apartment houses, as defined by K.S.A. 1976 Supp. 31-132a, but such rules and regulations shall not apply to buildings used wholly as dwelling houses containing no more than two (2) families;
(9) Other safeguards, protective measures or means adapted to render inherently safe from the hazards of fire or the loss of life by fire any building or other place in which people work, live or congregate from time to time for any purpose, except buildings used wholly as dwelling houses containing no more than two (2) families.
(b) Any rules and regulations of the state fire marshal adopted pursuant to this section may incorporate by reference specific editions, or portions thereof, of nationally recognized fire prevention codes.
(c) The rules and regulations adopted pursuant to this section shall allow facilities in service prior to the effective date of such rules and regulations, and not in strict conformity therewith, to continue in service, so long as suck facilities are not determined by the state fire marshal to constitute a distinct hazard to life or property.” (Emphasis added.)
Pursuant to K.S.A. 31-133(b), the state fire marshal promulgated K.A.R. 22-12-1, which became effective January 1, 1973, and provided:
“Section 11-0001, a, b, c, and d of the national fire protection association life safety code number 101, 1970 edition is hereby adopted by reference.”
The portions of the life safety code adopted by the regulations require that an apartment must have at least one exit with a side-hinged swinging door. The sixty-eight apartments in question do not meet this requirement. Appellant argues there is *791insufficient evidence to support a conclusion that all sixty-eight doors “constitute a distinct hazard to life or property” and therefore, the grandfather clause in K.S.A. 1979 Supp. 31-133(c) protects appellant from the order directing a change in all the doors. The order and determination of the fire marshal was based solely upon the complaint of Ms. Chatham, the inspection of her apartment by Mr. Darrell Dibbern, and the requirements of the life safety code. There can be no logical argument that the apartment of Ms. Chatham does not constitute a distinct hazard to life or property. It is undisputed that she was frozen into or out of her apartment on several occasions for various periods of time, and once was confined for nearly twenty-four hours. Such a situation is an obvious hazard to life or property. Does that determination automatically justify the conclusion that all sixty-eight doors are such a hazard? We think not. There was no evidence whatsoever that there was ever a malfunction in any of the doors in buildings 3740 and 3750. There was no evidence that buildings 3720, 3740 and 3750 were subject to the drainage and soil conditions which caused the settling of building 3730. In fact, 3720 lies east and west, while the other buildings lie north and south, and it presumably is not affected by the drainage from the east. The sole incident involving building 3720 was in 1977 and apparently after corrective work was undertaken there have been no other complaints of freezing doors in that building. There was no evidence the doors in 3720,3740 and 3750 constituted a hazard to life or property other than the fact they were the same type and quality as those in 3730. To the contrary, the plaintiff’s expert was of the opinion they did not constitute a hazard and lacking such a showing, K.S.A. 1979 Supp. 31-133(c) protects plaintiff from the provisions of the life safety code when it was not a requirement at the time the buildings were constructed. The judgment of the district court as to buildings 3720, 3740 and 3750 must be reversed and the order of the fire marshal as to those buildings set aside.
However, building 3730 is another matter. Four different apartments in that building have experienced difficulties with frozen doors, two of them on more than one occasion. Mr. Dressier testified that due to soil and drainage problems, the west side of the building, where the entrances are located, had settled causing the balcony to partially give way, resulting in the of*792fending doors becoming “scrunched” and allowing cold air to infiltrate and cause ice formation on the interior of the doors and in the track at the bottom of the doors. Such a condition obviously must be corrected. The fire marshal found such a condition to be a hazard to life or property and based upon the requirements of the life safety code considered the only solution to be replacement of the doors with side-hinged, swinging doors.
Building 3730 complied with all existing codes and requirements at the time of its construction. Evidently, problems with the doors have developed gradually over a period of time due to the improper drainage which has caused the building to settle. Mr. Dressier indicated that to change from sliding to swinging doors would destroy or ruin the architectural integrity of the building and presumably affect the entire complex. We do not think such a drastic remedy is necessary to comply with the statutes and regulations although we do find that there was substantial competent evidence to uphold the determination that all of the doors in building 3730 should be replaced. The building constructed in 1965 is obviously subject to an ongoing need for repairs. The building complied with the necessary building codes at the time of construction and the replacement of the doors would constitute necessary repairs which have become required due to the passage of time and other factors. It would seem to be obvious that if the west side of the building is settling then it is only a matter of time until other apartments in the building experience the same difficulties encountered by Ms. Chatham. Mr. Dressier testified there are high quality sliding doors which, combined with proper repairs to the balcony, door casings, etc., would alleviate the problem of freezing and in some ways would be preferable to and safer than hinged, swinging doors. We hold that the decision of the district court affirming the order of the fire marshal that the doors in building 3730 be replaced should be affirmed subject, however, to the provision that the plaintiff shall have the option to install either new high quality sliding doors or hinged, swinging doors, so long as whichever style is selected will avoid further freezing of the doors, thereby eliminating the hazard which now exists.
The judgment of the district court is reversed in part, affirmed in part as modified, and remanded for further proceedings in accordance with the views set forth herein.