
98 Cal.Rptr.2d 733 (2000)
82 Cal.App.4th 729
Marvin J. SOUTHARD, as Director, etc., et al., Petitioners,
v.
The SUPERIOR COURT of Los Angeles County, Respondent;
Kristina M., Real Party in Interest.
No. B139471.
Court of Appeal, Second District, Division Two.
July 27, 2000.
*734 Lloyd W. Pellman, County Counsel, Leela A. Kapur, Assistant County Counsel, and Patrick A. Wu, Principal Deputy County Counsel, for Petitioners.
Law Offices of Kenneth P. Sherman and Angela Pierce di Donato for Real Party in Interest.
No appearance for Respondent.
NOTT, Acting P.J.
Petitioners, the Los Angeles County Department of Mental Health and its director, Marvin J. Southard, seek a writ of mandate directing the superior court to set aside its order granting real party in interest's motion to join petitioners as parties in a dependency case.

I. FACTUAL AND PROCEDURAL BACKGROUND
Referee Marilyn Mackel was assigned to hear a dependency matter involving real party, Kristina M. On December 2, 1999, Kristina's counsel filed a motion before Referee Mackel seeking to join the Los Angeles County Department of Mental Health and its director, Marvin J. Southard (collectively Department) and the Los Angeles Unified School District[1] as parties in the dependency action.
Kristina contended that joinder was required so that the juvenile court could direct the Department and the school district "to comply with their obligations to provide mental health assessment, treatment services and special education related services to the Minor, including any home and/or community based mental health services that may be needed." Kristina's counsel did not claim that either the school district or the Department had failed to provide services. She merely stated that "[t]hese agencies have been unclear about their respective duties to provide these services."
The Department, in its opposition to the joinder motion, asked that the motion be transferred to a superior court judge. At *735 the hearing on the motion, the Department announced that it would not stipulate to a referee, and again requested that the motion be heard by a superior court judge. The Department's request was denied, and the motion for joinder was granted. The Department filed an application for rehearing. When it was denied, the Department moved the court to reconsider the order denying the Department's request for a rehearing. The court denied the motion for reconsideration, and this petition for writ of mandate followed.

II. CONTENTIONS
The Department contends it had a right to have the proceedings heard by a superior court judge rather than a referee. Alternatively, the Department argues that there were no grounds for joinder.

III. DISCUSSION

A. The referee was not required to transfer this matter to a superior court judge.
Welfare and Institutions Code section 248[2] empowers a referee to exercise the same judicial authority as a judge of the juvenile court, except in hearings to which the state or federal constitutional prohibitions against double jeopardy apply.[3] If the parties so stipulate, a referee may sit as a temporary judge. (Cal. Const., art. VI, § 21.) When a referee sits as a temporary judge, his or her orders become final in the same manner as orders made by a judge. (§ 250.) If, however, the parties refuse to stipulate, and the referee does not sit as a temporary judge, a party may apply to the juvenile court for a rehearing. (§§ 250, 252.) If the court grants the application, all rehearings of matters heard before a referee shall be before a judge of the juvenile court and shall be conducted de novo. (§ 254.)
The Department contends that a referee's authority to hear a dependency matter is dependent on whether the party has a rehearing right. The Department notes that whether a party has a right to a rehearing before a judge is governed by section 252, which gives a rehearing right to "a minor or his or her parent or guardian or, in cases brought pursuant to Section 300, the county welfare department." The Department concludes that because it does not fall within any of the categories set forth in section 252, the referee was required to obtain a stipulation before she could act on Kristina's motion for joinder. We disagree.
Section 248 provides that "[a] referee shall hear such cases as are assigned to him or her by the presiding judge of the juvenile court, with the same powers as a judge of the juvenile court, ..." Once the case involving Kristina was assigned to Referee Mackel, she had the same powers as a judge of the juvenile court, including the power to hear any motion to join additional parties. The Department, of course, had the right to refuse to stipulate to Referee Mackel. When the Department did so, section 250 came into play. That section provides that an order such as the one issued by Referee Mackel "shall become immediately effective, subject also to the right of review as hereinafter provided, and shall continue in full force and effect until vacated or modified upon rehearing by order of the judge of the juvenile court. In a case in which an order of a referee becomes effective without approval of a judge of the juvenile court, it becomes final on the expiration of the time allowed by section 252 for application for rehearing, if application therefor is not made within such time and if the judge of the juvenile court has not within such time ordered a rehearing pursuant to Section 253." This *736 language suggests that the Department was entitled to seek a rehearing pursuant to section 252.
Prior to 1997, section 252 provided that only "a minor or his or her parent or guardian" could seek a rehearing. In 1997, the "county welfare department" was given that same right. A review of the legislative history shows that the amendment was designed to "give a County Welfare Department the same rights to a rehearing by a juvenile court judge that are currently afforded to the minor and his or her parent or guardian concerning an order and findings made by a referee. The [sponsor] believes that this will allow the issues to be resolved directly by the juvenile court and reduce the need for appellate review. The sponsor also contends that the bill would provide greater protection to children by allowing a county welfare department to request judicial review of an order made by a juvenile court referee when the department has concerns about the referee's findings and order." (Sen. Com. on Judiciary, com. on Assem. Bill No. 329 (1997-1998 Reg. Sess.)) The Department construes the term "county welfare department" to mean "Department of Children and Family Services." We believe it should be construed to include county agencies that, like the Department, provide social services to children who have been adjudged dependents of the juvenile court. To construe the term in this way would allow referees to exercise the judicial authority bestowed upon them by section 248, and would, at the same time, ensure that a decision to join a county agency as a party to a dependency proceeding would be subject to the rehearing rules set forth in section 252, and thus subject to immediate review by a judge of the juvenile court. To construe the term in any other way would mean that in those cases where a motion to add the Department as an additional party is denied, the minor, or his or her parent or guardian, or the Department of Children and Family Services could seek a rehearingbut the Department could not. We do not believe this is what the Legislature intended.
We conclude, therefore, that the term "county welfare department" must, for purposes of section 252, be construed to include county agencies, such as the Department, who are required to provide social services to children who have been adjudged dependents of the juvenile court. Given our conclusion, it follows that Referee Mackel was not required to obtain a stipulation from the Department before she could act on Kristina's motion for joinder.

B. The motion for joinder should have been denied.
Section 362, subdivision (a) provides that the juvenile court may "join in the juvenile court proceedings any agency that the court determines has failed to meet a legal obligation to provide services to the minor."
A review of the motion filed by Kristina's counsel shows that it does not contain the allegation that the Department failed to meet a legal obligation to provide services to real party. Moreover, although the trial court referred to evidence contained within the dependency file which allegedly supported joinder, the court conceded that it had no evidence demonstrating that the Department had violated any legal obligation. The referee ordered joinder because she believed that joinder was necessary to "assure that the appropriate funding is made available and that wraparound services are provided to Kristina."
Kristina claims, without discussing the requirements of section 362, subdivision (a), that joinder was proper. Alternatively, Kristina suggests we conduct a "harmless error" analysis. According to Kristina, even if the Department "did not have a duty to provide [her] with mental health services because it was not aware of [her] need for such services, [the Department] became aware of her needs at the January 5, 2000 court hearing." Kristina then asserts *737 that "[s]ince that time, no written plan has been provided to counsel or the trial court detailing what mental health services will be provided" to her. Kristina concludes that since the Department "has violated Welfare and Institutions Code section 5694.7 which requires that the determination is to be submitted in writing within 30 days, joinder of [the Department] would now be proper even if it was improper before."
Although the Department may have violated some statutory duty after the January 5, 2000 hearing,[4] it is clear that at the time the juvenile court considered the joinder motion it had no evidence before it demonstrating that the Department had violated any legal obligation to Kristina. We conclude, therefore, that joinder was improper.

IV. DISPOSITION
Let a writ of mandate issue directing the juvenile court to set aside its order granting real party's motion for joinder and to enter a new and different order denying the motion.
COOPER, J., and MALLANO, J.[*], concur.
NOTES
[1]  The school district is not a party to this writ proceeding.
[2]  All further statutory references are to the Welfare and Institutions Code unless otherwise indicated. U. (1993) 14 Cal.App.4th 1543, 1551, 18 Cal. Rptr.2d 555.)
[3]  This statutory exception does not pertain in juvenile dependency matters. (In re Roderick
[4]  Counsel for the minor suggests that if we find that joinder was improper, and that this was not "harmless error," we "remand this matter to the trial court for findings based on the inaction of [the Department] since the joinder hearing on January 5, 2000." The minor's request is denied. We note, however, that if counsel for the minor has evidence indicating that joinder is proper under section 362, subdivision (a), counsel may renew the joinder motion.
[*]   Judge of the Los Angeles Superior Court, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
