
576 N.E.2d 435 (1991)
216 Ill. App.3d 806
159 Ill.Dec. 766
In re MARRIAGE OF Robyn G. OERTEL, Petitioner-Appellant, and
Bruce L. Oertel, Respondent-Appellee.
No. 2-90-1229.
Appellate Court of Illinois, Second District.
July 19, 1991.
*437 Cellucci, Yacobellis & Holman, Marsha H. Cellucci, William D. West, Naperville, for Robyn G. Oertel.
Fortunate, Farrell & Davenport, Ltd., Linda E. Davenport, Westmont, for Bruce L. Oertel.
Justice DUNN delivered the opinion of the court:
Petitioner, Robyn Forister (Robyn), once known as Robyn Oertel, appeals from an order of the circuit court of Du Page County, denying her petition which sought modification of the custody provisions of the judgment dissolving her marriage to respondent, Bruce Oertel (Bruce). On appeal, Robyn contends that the trial court erred by: (1) failing to apply the best-interests-of-the-child standard pursuant to the parties' agreement in ruling on the petition rather than the standard of serious endangerment to the child; and (2) ruling that she failed to meet her burden of establishing serious endangerment when there was evidence that Bruce was continuing to use alcohol and illegal drugs after the divorce despite prior alcohol and substance abuse problems. We reverse and remand.
Bruce and Robyn were married in 1985 shortly after they graduated from high school. Their daughter, Jessica, was born on June 28, 1985. On March 6, 1989, Robyn filed a petition for dissolution of marriage in the circuit court of Du Page County. Robyn and Bruce entered into a marital settlement agreement which was incorporated into the judgment for dissolution of marriage that the court entered on November 9, 1989.
The marital settlement agreement contained a joint-parenting agreement which provided that Bruce and Robyn would have joint custody of Jessica. Additionally, Bruce was to have physical possession of Jessica during the school year and Robyn would have physical possession of her during the summer months. The agreement also stated that "each parties' [sic] right to physical possession of the child is expressly conditioned upon his or her residing with his or her parents."
On January 24, 1990, Robyn filed an emergency petition for rule to show cause and for primary physical possession of Jessica. The petition was dismissed on February 5. On February 7, Robyn filed an amended petition for rule to show cause along with a separate petition for modification of joint custody. In these petitions, Robyn alleged that Bruce had entered an inpatient program at Mercy Hospital Center for drug and alcohol rehabilitation in January 1989 and had been diagnosed as an alcoholic and a chemically dependent individual. Robyn further alleged that Bruce left the program early and continued to drink alcoholic beverages thereafter. She also claimed in the petition that Bruce no longer lived with his parents and had moved into an apartment with his pregnant girlfriend.
Pursuant to the agreement of the parties, Judge Provenzale entered an order on February 8, 1990, awarding temporary custody of Jessica to Bruce's mother. The parties subsequently agreed to have the matter transferred to a different judge so it could be set for trial at an earlier date than Judge Provenzale could schedule it. The case was reassigned to Judge Cox and was set for trial on August 28, 1990.
On the first day of trial, Judge Cox entered an order pursuant to the agreement of the parties. The order stated that Robyn would withdraw her petition for modification of joint custody and her amended petition for rule to show cause and would waive her right to file a petition to vacate the judgment for dissolution pursuant to section 2-1401 of the Code of Civil Procedure (Code) (Ill.Rev.Stat.1989, ch. 110, par. 2-1401). The order further stated as follows:
"2. The custody, visitation and child support provisions of the Judgment for Dissolution of Marriage and Marital Settlement Agreement incorporated therein entered November 9, 1989, specifically Article III Joint Parenting Agreement and Article VII Allowance for Child Support are hereby vacated;
3. The custody, visitation and child support issues shall proceed to trial pursuant *438 to section 602 of the Illinois Marriage and Dissolution of Marriage Act as though no judgment had been previously entered affecting said issues."
The trial then commenced with the court hearing testimony from Robyn and two other witnesses.
The next day, Bruce's attorney raised the issue of whether the trial court had jurisdiction to proceed under the circumstances. The trial judge then stated that he shared the same concern and vacated the agreed order of the previous day, ruling that a petition pursuant to section 2-1401 of the Code would be required before the joint-custody provisions of the judgment for dissolution could be vacated. Robyn filed a motion to reconsider this ruling, but the motion was denied.
In September 1990, Robyn filed a three-count petition with the circuit court. In count I, she sought to have the custody provisions of the dissolution judgment vacated pursuant to section 2-1401 of the Code because they resulted in part from Bruce's fraudulent promise to continue residing with his parents. In count II, Robyn asserted that Bruce had violated the custody provisions of the dissolution judgment by moving away from his parents; therefore, his right to primary physical possession of Jessica should be terminated. Robyn contended in count III that, even if the court employed the serious endangerment standard, primary physical custody of Jessica should be transferred to her because Bruce's continuing use of alcohol and drugs posed a threat to Jessica.
The trial on this petition commenced on September 19, 1990, with the parties agreeing that the testimony presented at the August 28 hearing could be considered. The following summary of the trial evidence therefore includes the August 28 testimony.
Robyn testified as follows at trial. While she was married to Bruce, he generally drank between 6 and 12 beers per day. Bruce also typically used marijuana every day and occasionally used cocaine, LSD, and PCP. Once while the couple was still married, Bruce left some cocaine and a razor blade on a living room table overnight, and Jessica was in the room the next morning while these items were still present. Bruce entered an inpatient program at the Mercy Hospital Center for alcohol and drug rehabilitation in January 1989. During one of Robyn's visits with Bruce at the hospital, Bruce stated that he was feeling good, he had admitted he was an alcoholic, and that was the first step to recovery. Bruce had Robyn pick him up from the hospital several days before the program was due to end, however, and he left the program at that point.
Robyn further testified that Bruce continued drinking alcohol after leaving the Mercy Hospital program. Several times after they became separated in March 1989, Robyn dropped Jessica off at the home of Bruce's parents following visitation and saw Bruce with a beer in his hand. Bruce also admitted during various conversations with Robyn that he had been intoxicated on July 20, 1989, August 29, 1989, and once in October 1989. He told Robyn he had become intoxicated on July 20 because it was their wedding anniversary and it was the only way he could deal with it.
According to Robyn, Bruce took Jessica to Wisconsin on Memorial Day weekend in 1989. Jessica told Robyn when they returned that her head had been under water while she and Bruce were swimming in a lake. Bruce downplayed the matter and told Robyn that nothing serious had happened. Several months later, however, Robyn received an article about the incident from a newspaper in a small Wisconsin town. The article stated that Bruce had suffered from hypothermia while attempting to swim out to a raft in a lake with Jessica on his back. Jessica was not wearing any type of flotation device. Bruce and Jessica both went underwater and had to be rescued by lifeguards. Bruce's hypothermia was exacerbated by alcohol consumption, according to the article, although he was not legally intoxicated.
Robyn further testified that she discovered in November 1989 that Bruce, contrary to the terms of the joint-parenting agreement, had moved with Jessica out of his *439 parents' home and had moved into an apartment with his girlfriend, Sharon. Bruce and Sharon got married in February 1990. Bruce does not dispute that he did in fact move out of his parents' home in November and move in with Sharon, who was pregnant with his child at the time.
When asked about her past use of illegal drugs, Robyn testified that she had tried cocaine twice with Bruce but had not used it for about five years. Robyn had also occasionally smoked marijuana but had not done so for about two years. Robyn was currently residing with her parents and her brother in a house in Naperville. She worked as a property manager for First United Property Management in Naperville.
Ruth Forister, Robyn's mother, testified that when she picked Jessica up from Bruce's apartment on June 14, 1990, Bruce answered the door. Mrs. Forister stated that when he did so, she stepped back at first because of powerful odors that smelled like tobacco and beer. Mrs. Forister also stated that one time in April 1985 she found a packet of cocaine on the front porch of her home shortly after Bruce had been there. Bruce subsequently admitted to her that the cocaine was his.
Deborah Camerier testified that she had seen Bruce use illegal drugs many times. The last time was at her apartment on February 8, 1990, when she saw Bruce using cocaine. According to Camerier, her boyfriend, Steven Peck, and one other man were present at the time. Peck testified that he and Bruce were together on the night in question but took the fifth amendment when he was asked about cocaine usage. Bruce denied that he was at Camerier's apartment on February 8 and testified that he was home all night because he was marrying Sharon the next day. Sharon corroborated Bruce's testimony in this regard.
Dr. Lyle Joffe testified that he is a psychologist who first saw Bruce and Robyn in the spring of 1989 for a court-ordered evaluation while their marital dissolution case was pending. Dr. Joffe stated that he helped the parties prepare a joint-parenting agreement because they wished to resolve the issue of custody without litigation. The draft joint-parenting agreement which he helped prepare did not contain any language requiring the parties to reside with their parents.
After Robyn filed her initial post-judgment petitions regarding custody, Judge Provenzale again referred the matter to Dr. Joffe for evaluation. Dr. Joffe separately interviewed Robyn and Bruce several times in March 1990. He also administered psychological tests to both of them and observed each of them separately with Jessica. Dr. Joffe prepared a 12-page report dated April 9, 1990, which was admitted into evidence.
The report submitted by Dr. Joffe states as follows. In the interviews with Robyn, she expressed concern about Bruce's continuing use of drugs and alcohol. Robyn appeared to be a stable individual who was capable of taking care of Jessica. Robyn demonstrated a reasonably insightful understanding of Jessica and her concerns. Although Bruce told Dr. Joffe that the relationship between Robyn and Jessica was strained, the report states that Dr. Joffe saw no indication this was true.
The report further states that Bruce denied any current drug use and voluntarily presented himself for a drug screening in April 1990 which turned out to be negative for all substances. Bruce admitted that he still drank alcohol socially, usually when he was out with his second wife, and he would also drink beer at home on the weekends. Bruce estimated that he drank a six-pack of beer on an average weekend. Although, according to the report, Bruce had been diagnosed at Mercy Hospital as suffering from alcohol and drug abuse, Bruce stated during an interview that he was not sure whether he was an alcoholic.
According to the report, Bruce admitted that he drank a few beers before entering the water on the day of the incident in which he and Jessica had to be rescued from the lake. Bruce told Dr. Joffe that he had placed Jessica on his back and attempted to swim some 40 to 50 yards out to a raft. Bruce stated that he had been stupid *440 for failing to put a flotation device on Jessica. The report states that this incident combined with Bruce's questioning of his diagnosis as an alcoholic and his continued use of alcohol raises serious questions about his judgment with regard to his drinking.
Dr. Joffe concluded in the report that it would be best for Jessica if Robyn was awarded sole custody of her. This is because Robyn appeared to be stable and capable of caring for Jessica while Bruce's continued use of alcohol seemed to adversely affect his judgment as a parent. The report states that, considering Bruce's hospitalization for alcohol abuse and his diagnosis as an alcoholic, Bruce should not drink alcohol under any circumstances. Although Dr. Joffe felt that Bruce loved Jessica, he felt Bruce should not be allowed to retain custody of her for the above reasons.
When asked if he felt that allowing Bruce to retain custody would seriously endanger Jessica, Dr. Joffe responded in the affirmative. He stated that the reason for this conclusion was that Bruce continued to drink alcohol after he had been diagnosed in January 1989 as being in the late stages of alcoholism. Dr. Joffe also made reference to the Memorial Day weekend incident in the Wisconsin lake in support of his opinion.
Bruce testified that while he was at Mercy Hospital in January 1989, he admitted to the staff members in his program that he was an alcoholic and that he usually drank 6 to 12 beers each day. Bruce also told the staff members that he used marijuana once or twice a week and cocaine once or twice a month. With regard to the Memorial Day weekend incident, Bruce testified that he tried to swim out to a raft about 20 yards from the shore with Jessica on his shoulders. Bruce testified that he went underwater twice due to hypothermia but Jessica's head never went underwater. He made it to the raft but did not have the energy to pull himself up onto it because of the hypothermia. A friend of his and a lifeguard then came out to help Bruce and Jessica onto the raft. Bruce testified that at the time of the incident he had opened a can of beer but had not finished it, and this was the only drinking he had done that day.
Mariann Oertel, Bruce's mother, testified that she ran a Montessori school which Jessica attended. She further testified that Robyn did not show much interest in Jessica's work at the school, and Jessica did not seem to wish to leave with Robyn when Robyn came to pick her up from school.
During trial, the judge granted Bruce a directed verdict on count I of Robyn's petition, in which she sought to have the custody provisions of the dissolution judgment vacated pursuant to section 2-1401 on the basis that Bruce had fraudulently promised to continue residing with his parents. The court's ruling, which is not at issue here, was based upon Robyn's apparent knowledge when the dissolution judgment was entered that Bruce had already moved. With respect to count II of the petition, the trial judge ruled that, even if Bruce had violated the custody provisions of the judgment by moving away from his parents, sole custody could only be granted to Robyn under section 610 of the Marriage and Dissolution of Marriage Act (Act) (Ill.Rev. Stat.1989, ch. 40, par. 610) if Robyn proved that Jessica's environment could seriously endanger her physical, mental, moral, or emotional health.
After the evidence was presented, the trial judge stated as follows:
"There is no question in my mind, Mr. Oertel, that it would be in the best interests of Jessica that she be in the physical custody of her mother Robyn. That, however, is not the test * * * that I must apply."
The trial judge also referred to Bruce as "a liar" and stated that he had not conducted himself in a manner which was in Jessica's best interests. The judge ruled that Bruce should retain primary physical possession, however, because the evidence did not establish that this would seriously endanger Jessica's physical, mental, moral, or emotional health. The instant appeal ensued.
*441 We must first consider Bruce's contention that this court should not consider whether the trial court's decision to vacate the August 28, 1990, agreed order was correct because Robyn did not file her notice of appeal within 30 days of the denial of her motion to reconsider that decision. This argument is without merit. With several exceptions for interlocutory orders which are not applicable here, this court's jurisdiction is limited to review of appeals from final orders. (134 Ill.2d R. 301; Renzulli v. Zoning Board of Appeals (1988), 176 Ill.App.3d 661, 662, 126 Ill.Dec. 116, 631 N.E.2d 411.) A final order is an order that terminates and disposes of the parties' rights regarding issues in the action so that, if affirmed, the trial court need only proceed with execution of the judgment. (In re Marriage of Watling (1989), 183 Ill.App.3d 18, 22, 131 Ill.Dec. 718, 538 N.E.2d 1274.) If an order leaves the cause pending and undecided it is not a final order. (Watling, 183 Ill.App.3d at 22, 131 Ill.Dec. 718, 538 N.E.2d 1274.) Once a final appealable order is entered in a case, any preliminary orders will be reviewable on appeal from the final order. People ex rel. Scott v. Silverstein (1981), 87 Ill.2d 167, 171, 57 Ill.Dec. 585, 429 N.E.2d 483.
The instant post-judgment proceedings were brought by Robyn in an effort by her to gain sole physical custody of Jessica. The issue of whether she would be able to do so was not resolved until the court issued its order of October 3, 1990, stating that the prior custody arrangement would remain in effect. The order rescinding the August 28, 1990, agreed order and the one denying Robyn's motion to reconsider were only preliminary orders which, under Silverstein, did not become reviewable until a final and appealable order was entered on October 3. Since Robyn filed her notice of appeal within 30 days of that date, it was timely filed (see 134 Ill.2d R. 303(a)), and the preliminary orders in question may be reviewed.
Robyn's initial contention is that the trial court erred by vacating the August 28 agreed order and by failing to apply the best-interests-of-the-child standard as provided in that order. The debate between the parties on this issue erroneously centers upon the applicability of the revestment doctrine. Under this doctrine, litigants may revest a court which has general jurisdiction over a matter with personal and subject-matter jurisdiction over the specific cause after the 30-day period following entry of final judgment during which post-judgment motions must normally be filed. (In re Marriage of Demond (1986), 142 Ill.App.3d 134, 137, 96 Ill.Dec. 455, 491 N.E.2d 501.) The doctrine applies if the parties actively participate without objection in proceedings which are inconsistent with the merits of the previous judgment. Demond, 142 Ill.App.3d at 137, 96 Ill.Dec. 455, 491 N.E.2d 501.
Although a trial court ordinarily loses jurisdiction to vacate or modify a final and appealable judgment more than 30 days after it is entered, a circuit court has continuing jurisdiction in cases involving child custody judgments under section 601 of the Act (Ill.Rev.Stat.1989, ch. 40, par. 601(a)), which states that trial courts have jurisdiction to make child custody determinations in original or modification proceedings. (In re Marriage of Noble (1989), 192 Ill.App.3d 501, 505, 139 Ill.Dec. 133, 548 N.E.2d 518.) There was no need to revest the circuit court with jurisdiction to consider modifying the custody judgment when it clearly had jurisdiction to do so. The revestment doctrine is therefore irrelevant in this case.
The standards to be applied in child custody modification proceedings are set forth in section 610 of the Act (Ill.Rev.Stat. 1989, ch. 40, par. 610). That provision states in relevant part as follows:
"(a) Unless by stipulation of the parties, no motion to modify a custody judgment may be made earlier than 2 years after its date, unless the court permits it to be made on the basis of affidavits that there is reason to believe the child's present environment may endanger seriously his physical, mental, moral or emotional health.
(b) * * * In the case of joint custody, if the parties agree to the termination of *442 a joint custody arrangement, the court shall so terminate the joint custody and make any modification which is in the child's best interest" (Emphasis added.) Ill.Rev.Stat.1989, ch. 40, par. 610.
The case at bar involved a joint-custody arrangement in the original judgment for dissolution. Since the parties presented an agreed order to the court vacating the custody provisions of the dissolution judgment, which provided for joint custody, it is obvious they had agreed to terminate the joint-custody arrangement provided for in the judgment. Under these circumstances, section 610(b) clearly provides that the trial court shall make any modification which is in the child's best interest. The trial court therefore erred by applying the more stringent serious endangerment standard.
Although Robyn's petition to modify custody was filed within two years of the custody judgment, section 610(a) allows a motion to modify custody to be brought "by stipulation of the parties" even if there is no evidence of serious endangerment. The agreed order presented to the trial court by the parties provides that the custody provisions of the judgment would be vacated, and the custody issue would be considered pursuant to section 602 of the Act (Ill.Rev.Stat.1989, ch. 40, par. 602) as though no judgment had been entered. Section 602 provides that the court will determine custody in accordance with the child's best interest. Thus, the parties clearly agreed that custody could be modified without evidence of serious endangerment, making that standard inapplicable.
The trial judge apparently believed that under this court's recent decision in In re Marriage of Noble (1990), 192 Ill.App.3d 501, 139 Ill.Dec. 133, 548 N.E.2d 518, he was required to apply the serious endangerment standard unless the original custody judgment was vacated pursuant to section 2-1401 of the Code. In Noble, this court held that the circuit court erred in vacating a custody judgment when no section 2-1401 petition had been filed. (192 Ill.App. at 509-10, 139 Ill.Dec. 133, 548 N.E.2d 518.) We also held that, since the husband's petition to modify custody was filed within two years of the original custody judgment, the petition should only have been granted if the trial court found that the child's present environment may seriously endanger his physical, mental, moral, or emotional health. (192 Ill.App.3d at 509, 139 Ill.Dec. 133, 548 N.E.2d 518.) In Noble, however, there was no agreement between the parties to terminate a joint-custody arrangement, nor was there a stipulation that a motion to modify could be presented without evidence of serious endangerment. These factors distinguish the case at bar from Noble.
It is clear from the record that if the trial judge had applied the best-interest-of-the-child standard as he should have under section 610(b) of the Act (Ill.Rev. Stat.1989, ch. 40, par. 610(b)), he would have awarded sole custody to Robyn. The evidence at trial and the comments of the trial judge fully support such a determination. In two prior cases, past alcohol abuse by the custodial parent was a significant factor in the affirmance of circuit court decisions to modify custody although there was evidence in both cases that the custodial parent had stopped drinking. (See In re Marriage of Neeld (1981), 96 Ill.App.3d 40, 48, 51 Ill.Dec. 522, 420 N.E.2d 1080; Doyle v. Doyle (1978), 62 Ill.App.3d 786, 790, 19 Ill.Dec. 723, 379 N.E.2d 387.) Dr. Joffe's report states that Bruce had been diagnosed as an alcoholic while at Mercy Hospital. Bruce testified that he admitted to the hospital staff members that he was an alcoholic. Dr. Joffe's report states that under these circumstances Bruce should not drink alcoholic beverages under any circumstances. Bruce admitted at trial, however, that he continues to drink beer.
Moreover, the evidence concerning the swimming incident indicates that Bruce's drinking endangered Jessica on at least one occasion. Although Bruce testified that he had only opened one beer so far that day, Dr. Joffe's report states that Bruce admitted to drinking several beers before entering the water. The trial judge, who referred to Bruce as "a liar" and called him "reprehensible," apparently did not find Bruce's testimony to be credible. An additional *443 factor showing Bruce's irresponsibility is the fact that he directly violated the original custody judgment by moving with Jessica away from his parents. This provision was obviously placed in the judgment because, in light of Bruce and Robyn's prior use of drugs and alcohol, it was necessary to ensure that there would be other responsible adults present to supervise Jessica. Bruce's cavalier disregard of this provision is further evidence of his willingness to act without regard to Jessica's best interests. Thus, we agree with the trial court's determination that under the best-interest standard sole custody of Jessica must be awarded to Robyn. In light of the trial evidence that Robyn had not used illegal drugs for two years and was leading a stable existence, her right to custody of Jessica need no longer be conditioned upon continued residence with her parents.
We further note that even if the parties had not agreed to vacate the terms of the prior judgment, Bruce's violation of the provision requiring him to live with his parents would have justified terminating his custody rights. The trial judge stated that, even if Bruce did violate this provision, section 610(a) would only permit him to modify custody within two years if there was evidence of serious endangerment. This conclusion was completely erroneous. Section 610(a) only limits a trial court's ability to modify a custody judgment. The custody judgment in this case expressly conditioned Bruce's physical possession of Jessica on his continued residence with his parents. Thus, the trial judge would not have been modifying the custody judgment by terminating Bruce's right to custody for violating the provision in question; he would have merely been enforcing the terms of that judgment.
For some inexplicable reason, the trial judge expressed doubts about the enforceability of the above provision of the custody judgment. As we have seen, the circuit court in entering the custody judgment fully incorporated the terms of a joint-parenting agreement into which the parties had entered. The setting of the terms of custody is discretionary with the trial court. (Crawley v. Bauchens (1973), 13 Ill.App.3d 791, 795, 300 N.E.2d 603.) Moreover, section 602.1 of the Act provides that in producing a joint-parenting agreement the parents shall be flexible at reaching resolutions which are in the child's best interest. (Ill.Rev.Stat.1989, ch. 40, par. 602.1.) In our view, the provision in question was an eminently reasonable one designed, in light of the parties' prior drug use, to assure there would be responsible adults present to care for Jessica. That provision should not have been ignored by Bruce or the trial court. Even if the court did not believe the original custody judgment could be vacated, the result should have been the same; sole custody should have been awarded to Robyn.
Although the trial court correctly assessed the course of action that would be in Jessica's best interests, it erred by concluding that it did not have the power under the law to make a ruling in accordance with those interests. The attorneys in this case did not help matters by placing their primary emphasis in the trial court and on appeal on an irrelevant debate over the applicability of the revestment doctrine. As the recent opinion of the court in In re Ashley K. (1991), 212 Ill.App.3d 849, 156 Ill.Dec. 925, 571 N.E.2d 905 illustrates, the emotional damage done to a young child because of an erroneous ruling in a custody matter often cannot be completely undone by reversal of the ruling on appeal. It is therefore imperative that circuit court judges exercise the utmost caution in such cases to protect the interests of the young children involved.
For the above reasons, we reverse the order of the circuit court of Du Page County and award sole custody of Jessica to Robyn. We remand the cause to the circuit court to determine Bruce's visitation rights and to resolve the issue of child support. In light of the evidence concerning Bruce's continued use of alcohol and the danger this has posed to Jessica, Bruce shall only be permitted to visit with Jessica if he is in the company of one of his parents or any other responsible adults designated by the trial court. Bruce's visitation *444 with Jessica shall continue to be supervised in such a manner until he is able to demonstrate to the trial court that he is no longer using alcohol and unsupervised visitation will pose no danger to Jessica.
Reversed and remanded.
McLAREN and NICKELS, JJ., concur.
