
141 Ill. App.3d 818 (1986)
490 N.E.2d 1327
DAVID L. BLAND et al., Petitioners-Appellants,
v.
THE DEPARTMENT OF CHILDREN AND FAMILY SERVICES, Guardian of Stephanie Leonatti, a Minor, Defendant-Appellee.
No. 3-85-0110.
Illinois Appellate Court  Third District.
Opinion filed March 6, 1986.
Rehearing denied April 17, 1986.
*819 Gary W. Wangler and Louis E. Olivero, of Peru, for appellants.
Neil F. Hartigan, Attorney General, of Springfield (Jill Wine-Banks, Solicitor General, and Gabriel M. Rodriguez, Assistant Attorney General, of Chicago, of counsel), for appellee.
Reversed and remanded.
JUSTICE STOUDER delivered the opinion of the court:
This is an appeal from the La Salle County circuit court judgement denying petitioners-appellants' petition for adoption on the ground that the Department of Children and Family Services had withheld consent.
The child whom petitioners seek to adopt, their granddaughter, *820 Stephanie Leonatti, was born on August 7, 1973. When Stephanie was two years old she began to reside in the home of petitioners, Mr. and Mrs. Bland. Mr. Bland is a truck driver, away from home six to seven months out of the year, and Mrs. Bland is a housewife. For the next four years, the Blands provided for Stephanie's support and enrolled her in school. When Stephanie was in second grade, Mrs. Bland gave the custody and care of Stephanie back to her daughter, Pamela, Stephanie's mother. In May 1982, after two years of living with her natural mother, Stephanie was made a ward of the court and her care and custody was transferred to the Illinois Department of Children and Family Services (DCFS). Mrs. Bland visited and corresponded with Stephanie often after this, but was later denied these privileges after Stephanie was removed to Guardian Angel Home in Peoria. Mrs. Bland continued to correspond, but her letters were not delivered and remain in the files of DCFS.
In June of 1982, the Blands requested that Stephanie be placed with them for foster care. DCFS then hired Dr. James Tiller, a psychologist with the Spoon River Mental Health Center, to see Mr. and Mrs. Bland, their daughter, Pamela, and Stephanie for a diagnostic assessment of them. Dr. Tiller testified he felt Stephanie had some behavioral problems, that Stephanie's grandmother and mother were emotionally entangled in a love/hate/hostile/affectionate relationship and as such had not resolved the issue of independence and separateness. In his report, Dr. Tiller said Stephanie should return and reside with her mother, Pamela Bland.
In January 1983, the petition for adoption was filed in La Salle County. Gary Rands, head of the adoption unit for DCFS, and the person responsible for making consent decisions for the agency, made his decision from a review of Stephanie's file. Mr. Rands testified that the file began in May 1982 and included school records, caseworker materials and the reports of Dr. Tiller. In addition to reviewing the file, Mr. Rands spoke with some of the employees of the Guardian Angel Home where Stephanie has been staying. He did not request a home study of petitioners, or a school evaluation of Stephanie for the time during which she lived in petitioners' home. Mr. Rands had never met with Mr. or Mrs. Bland prior to making the decision not to consent to adoption.
The petitioners-appellants assign four errors. These are:
I. The court erred in not finding that the Illinois Adoption Act denies procedural due process and equal protection under the United States and Illinois constitutions.
II. The court erred in granting the defendant DCFS' motion to *821 dismiss for the reason that they had not consented to the adoption, as consent is not required to adopt a related child.
III. The court erred as the decision was against the manifest weight of the evidence as to the arbitrariness and capriciousness of the nonconsent.
IV. The court erred in allowing certain evidence concerning petitioner's mental health evaluation contrary to the privilege in the Mental Health and Developmental Disabilities Confidentiality Act (MHDDCA) (Ill. Rev. Stat. 1983, ch. 91 1/2, par. 801 et seq.).
After a review of the record, we conclude that assignment I lacks merit, but numbers II, III and IV warrant extended discussion. Assignment I can be disposed of on fairly obvious grounds.
 1 Petitioners' contention is that the failure of the Illinois Adoption Act to provide any notice or opportunity to be heard, at the point in time when DCFS decided not to consent to the adoption, deprives them of due process and equal protection rights guaranteed under the United States and Illinois constitutions. Among the elements which make up due process are reasonable notice, an opportunity for a fair hearing and the right to have a court of competent jurisdiction determine the sufficiency of the evidence. (16C C.J.S. Constitutional Law sec. 967 (1985).) We do not see that a violation of constitutional rights is involved in this case. When a statute, such as we have, makes provisions for conditions and procedures to be followed in creating the relationship of a parent and child between persons not so related by nature, followed by a trial of the issue by a court of general jurisdiction at the election of the party aggrieved, with the right of ultimate appeal to the highest court of the State, the requirements for due process of law are discharged.
 2 In measuring petitioners' claim of a denial of equal protection, we again find no violation of constitutional rights. There is hardly a law on the books that does not affect some people differently from others (see San Antonio Independent School District v. Rodriguez (1973), 411 U.S. 1, 36 L.Ed.2d 16, 93 S.Ct. 1278). Under traditional analysis, the equal protection clause does not deny to States the power to treat different classes of persons in different ways, but a classification must be reasonable, not arbitrary, and have a fair and substantial relation to the object of the legislation so that all persons similarly circumstanced shall be treated alike (Reed v. Reed (1971), 404 U.S. 71, 75-76, 30 L.Ed.2d 225, 229, 92 S.Ct. 251, 253-54). A State does not violate the guarantee merely because the classifications made by its laws are imperfect (Dandridge v. Williams (1970), 397 U.S. 471, 485, 25 L.Ed.2d 491, 501, 90 S.Ct. 1153, 1160), and a *822 statutory discrimination will not be set aside if any state of facts reasonably may be believed to justify it (McGowan v. Maryland (1961), 366 U.S. 420, 426, 6 L.Ed.2d 393, 399, 81 S.Ct. 1101, 1105).
 3 Petitioners here contend they stand in loco parentis as to Stephanie, and as such, should be afforded the same rights to notice which are provided for natural and legally adoptive parents under the Adoption Act. The term "in loco parentis" implies a standing in the place of a parent; one charged fictitiously with parents' rights, duties, and responsibilities. (Reynolds v. United States (D. Kan. 1951), 96 F. Supp. 257, 261.) It is uncontested that for a period of time petitioners took care of the child and then turned the child back over to the natural mother, thus they did not enjoy the rights, nor were they burdened by the obligations of "parents" at the time of the alleged deprivation. In fact, the record is clear the legal party in loco parentis was the agency at the time the consent decision was required to be made. We find no merit to the contention that the failure to provide notice to these petitioners at the time DCFS denied their consent to the adoption deprived them of the equal protection of law so as to render the court's determination dismissing their petition constitutionally invalid.
 4 Assignments of error numbers II and III raise more serious questions. Respondents contend the plain meaning of the statute directs that consent is required in all cases of adoption and, therefore, the petition was deficient in that DCFS refused to consent to the adoption. It is submitted that since adoption is a creature of statute and in derogation of common law, the Adoption Act must be strictly construed. Respondents urge that all the allegations required by the statute must appear on the face of the adoption petition. One of these necessary allegations is that either the natural parents or the appropriate adopting agency consent to the adoption. If consent to the adoption is not present, respondents argue that the trial court must dismiss the petition because this requirement is mandatory. On the other hand, petitioners contend that consent is not required in the case of an adoption of a related child.
The trial court held that it was necessary to determine as a preliminary matter whether DCFS' refusal to consent was arbitrary and capricious before reaching the issue whether the child was a related child to the petitioners. After a trial of the issue the court dismissed the adoption petition on the ground that there was a lack of consent thereto, for good and sufficient reason, by the agency having the legal custody with the right to consent to the adoption of the child whose adoption was sought.
*823 The relevant language of the Adoption Act (Ill. Rev. Stat. 1981, ch. 40, par. 1501 et seq.) is found in sections 1, 5, 6, 8, 13 and 15. Section 1 states in part:
"B. `Related Child' means a child subject to adoption where either or both of the adopting parents stands in any of the following relationships to the child by blood or marriage: parent, grand-parent, * * * or cousin of first degree. A child whose parent has executed a final irrevocable consent to adoption or a final irrevocable surrender for purposes of adoption, or whose parent has had his or her parental rights terminated, is not a related child to that person." (Ill. Rev. Stat. 1981, ch. 40, par. 1501(B).)
Section 5 states in part:
"B. A petition to adopt a child other than a related child shall state:
*   *   *
(j) That the person or agency, having authority to consent under Section 8 of this Act, has consented, or has indicated willingness to consent, to the adoption of the child by the petitioners, or that the person having authority to consent is an unfit person and the ground therefor, or that no consent is required under paragraph (f) of Section 8 of this Act * * *." (Ill. Rev. Stat. 1981, ch. 40, par. 1507(B)(j).)
Section 6 states in part:
"Within 10 days after the filing of a petition for the adoption of a child other than a related child, the court shall * * * investigate accurately, fully and promptly, the allegations contained in the petition; the character, reputation, health and general standing in the community of the petitioners; the religious faith of the petitioners and, if ascertainable, of the child sought to be adopted; and whether the petitioners are proper persons to adopt the child and whether the child is a proper subject of adoption. * * * The information obtained as a result of such investigation shall be presented to the court in a written report. * * *
Such investigation shall not be made when the petition seeks to adopt a related child or an adult unless the court, in its discretion, shall so order. * * *" (Ill. Rev. Stat. 1981, ch. 40, par. 1508.)
Section 8 states in part:
"Except as hereinafter provided in this Section, consent shall be required in all cases, unless the person whose consent would *824 otherwise be required shall be found by the court, by a preponderance of the evidence, to be an unfit person as defined in Section 1 of this Act, or the parent of an adult sought to be adopted. Where consents are required in the case of an adoption of a child, the consents of the following persons shall be sufficient:
*   *   *
(c) An agency, if the child has been surrendered for adoption to such agency; or
(d) Any person or agency having legal custody of a child by court order if the parental rights of the parents have been judicially terminated, and the court having jurisdiction of the guardianship of the child has authorized the consent to the adoption; * * *." (Ill. Rev. Stat. 1981, ch. 40, par. 8(c)(d).)
Section 13 states in part:
"As soon as practicable after the filing of a petition for adoption the court shall hold a hearing for the following purposes:
A. In other than an adoption of a related child or an adoption through an agency, or of an adult:
(a) To determine the validity of the consent, provided that the execution of a consent pursuant to this Act shall be prima facie evidence of its validity, * * *." (Ill. Rev. Stat. 1981, ch. 40, par. 13A(a).)
Section 15 of the Adoption Act states:
"The welfare of the child shall be the prime consideration in all adoption proceedings." (Ill. Rev. Stat. 1981, ch. 40, par. 15.)
The General Assembly reinforces the public policy enunciated in Section 15 by stating in Section 20a:
"The best interest and welfare of the person to be adopted shall be of paramount consideration in the construction and interpretation of this Act." Ill. Rev. Stat. 1981, ch. 40, par. 20a.
In Illinois, a surrender executed by a mother and a father, in which they voluntarily consent to a change of guardianship and custody to an authorized agency, is expressly sanctioned by law, and the courts have the strongest obligation not to permit surrenders to be constructively undone except for the weightiest of reasons. To hold, as petitioners suggest, as a matter of law, that agency consent is unnecessary in this case would seem to frustrate the underlying consent provision of the adoption statute, which requires consent in all cases. (Ill. Rev. Stat. 1981, ch. 40, par. 1510.) Under the doctrine of separation of powers, courts may not legislate, rewrite or extend legislation. If consent is not to be required in cases of adoption petitions filed by *825 grandparents after custody and guardianship have been vested in the State, that is a matter for the legislature. The courts have no right to expand the terms of the instant statute.
Petitioners cite Partington v. Department of Children & Family Services (1980), 91 Ill. App.3d 205, 414 N.E.2d 540, for the proposition that in a related child petition, the petitioner need not allege that the guardian (in this case DCFS) has consented to the adoption. The result reached in Partington was specifically rejected by the legislature through its amendment to the adoption statute's definition of a "Related Child." As such, the opinion is of historical, but not persuasive significance.
 5 Respondent cites no authority as being dispositive of this issue, but instead suggests "the plain language of the statute clearly directs that consent is required in all cases." Allegation of consent is not jurisdictional. Illinois courts maintain the position that even the so-called mandatory language of the adoption statute does not deprive the court of jurisdiction to determine an adoption petition where the best interests of the child are at stake. Steines v. Vaughn (1974), 23 Ill. App.3d 511, 319 N.E.2d 561.
When an agency withholds its consent to an adoption, the courts look to the reasonableness of the agency's refusal as the important factor in deciding whether the court will act in compliance with or opposition to the agency's determination. The courts give great weight to the opinion rendered by the trained personnel of an adoption agency, and in many instances have been guided thereby in their denial of an adoption petition based on the merit of a considered and well-reasoned refusal of the agency consent to a specific adoption. Where, however, the court considers the refusal to consent to be arbitrary, capricious, or unreasonable and without merit, the adoption petitions are allowed or determined to be allowable.
The standard to be used when an agency reviews its facts in making its determination on whether or not to consent is the best interest of the child. One can hardly consider whether or not a decision is arbitrary unless one considers evidence of best interest. Here, the trial judge excluded any evidence pertaining to the best-interest issue and, by doing so, may have excluded from the record facts that would or could have been considered by the agency.
 6 The facts of record considered by the agency fall far short of establishing that the adoption would not be in the best interest of Stephanie. DCFS made little effort or no effort to ascertain the history and success of child-rearing of these petitioners. No effort was made to determine whether the specific problems listed were likely to *826 be encountered in this case. Apparently, the agency did not even make the investigation required by the statute. (Ill. Rev. Stat. 1981, ch. 40, par. 1508). Even respondent and the court admit that the failure to make a home investigation left much to be desired. DCFS' decision to withhold its consent to the adoption of this child by petitioners was based, in large part, on certain feelings and inferences drawn by various agents of the agency, and these feelings and inferences might not have a factual basis. The denial of consent to adoption based on the contents of this agency's file alone was an excessive reaction by the agency, and exceeded the bound of reasonableness.
 7 Assignment of error No. IV concerns the introduction of evidence of petitioners' evaluation by the Spoon River Mental Health Center. We feel that since there will be a new trial, we must now consider this matter, since it is likely to recur. There was much testimony regarding communications between Mrs. Bland and Dr. Tiller. Petitioners contend that there was error in allowing the admission of conversations between petitioner and Dr. Tiller and argue that where a person makes statements to a therapist in a professional assessment, those statements are privileged. On the other hand, defendant argues that the privilege under this paragraph against disclosure of communications between patient and therapist is waived when mental well-being is specifically made an issue, and that by petitioning for adoption Mrs. Bland has placed her mental stability in issue. The Mental Health and Developmental Disabilities Confidentiality Act (Ill. Rev. Stat. 1981, ch. 91 1/2, par. 801 et seq.) provides that "in any civil * * * proceeding * * * a recipient, * * * has the privilege to refuse to disclose and to prevent the disclosure of the recipient's record or communications." (Ill. Rev. Stat. 1983, ch. 91 1/2, par. 810(a)). The statute then proceeds to list eight exceptions to the privilege, two of which are pertinent to this case: (1) Where the patient introduces his mental condition as an element of the case, and (2) Where the court orders an examination. We believe the privilege is too important to be brushed aside when the mental condition of the plaintiff may only be peripherally involved. It is not difficult to consider the many ways in which it could be argued that mental conditions were at issue, and soon there would exist more areas of inquiry deemed exceptions to the privilege than there would be areas of inquiry protected by the privilege.
The privilege should not be abused, and we therefore feel that the privilege can be waived either expressly or by affirmatively placing in issue one's mental condition. However, one does not place into issue his mental condition by filing a petition for adoption. Unless mental *827 well-being is specifically made an issue by the pleadings, the privilege pertains, and our trial courts should sustain petitioners' objections to permitting disclosure of these records and communications. If psychological testimony is deemed in order for the best interest of the child to be determined, the statute provides a procedure by which it can be obtained. As we have said, a court-ordered examination is not privileged. Ill. Rev. Stat. 1982, ch. 91 1/2, par. 810(4).
Due to the lapse of time and the necessity for a rehearing, it might well be that the agency should as a part of such procedure reconsider its decision on whether to grant or withhold consent to the adoption.
For these reasons, the judgment of the circuit court of La Salle County is reversed and this cause is remanded for further proceedings in accordance with this court's opinion that the decision to refuse consent was arbitrary in light of the inadequate investigation.
Reversed and remanded.
BARRY and WOMBACHER, JJ., concur.
