Opinion by
Judge Rogers,The Delaware County Institution District (Institution District) has filed a Petition for Review by which it seeks to overturn the action of the Pennsylvania Department of Public Welfare (DPW) deducting $1,-060,844.55 from the Institution District’s grant for child welfare programs for the calendar year 1976 in recoupment of the same amount overpaid in the grant to the Institution District for the same programs in and for its 1974 calendar year.
Section 704 -of the Public Welfare Code, Act of June 13, 1967, P.L. 31, as amended, 62 P.S. §704, provides that:
(a) The [Pennsylvania Department of Public Welfare] shall make annual grants to county institution districts or their successors to defray part or all, as the case may be, of the cost of child welfare programs authorized by law and developed jointly with the department in the following amounts of the total of all such approved expenditures for all county institution districts or their successors:
(1) Until June 30,1974, no more than sixty percent.
(2) From July 1, 1974 to June 30, 1975, no more than seventy-five percent.
(3) From July 1, 1975 and thereafter, no more than ninety percent.
(b) In the event that sufficient State funds to pay the full amount of the grants to which county institution districts or their successors may be entitled under the provisions of this sec*168tion have not been appropriated, the department shall distribute State funds among the county institution districts or their successors by a formula reasonably designed to achieve the objectives of section 701 of this article.
Section 707 of the Public Welfare Code, 62 P.S. §707, provides that DPW may recoup excess grants in the following manner:
The department shall review the annual grant at the end of each calendar year and, if it was not warranted by the actual expenditures, shall adjust one or more installments of the next annual grant in order to recover the amount of such excess. If any installment of the next annual grant is not paid to the county institution district or its successor because of failure to comply with the requirements of section 701 of this article, the department shall effect a refund of such excess.
That DPW made an overpayment of $1,060,844.55 in its grant to the district for the 1974 calendar year child welfare programs is undisputed. DPW recouped the overpayment by deducting that amount from the Institution District grant for its 1976 calendar year.
The Institution District and Delaware County filed a complaint with the Board of Arbitration of Claims alleging that provisions of the Public Welfare Code created a contract between them and DPW and that DPW had followed improper procedures in recouping the acknowledged overpayment. On preliminary objections filed by DPW, the Board of Arbitration of Claims dismissed the complaint for lack of jurisdiction, concluding that overpayments by DPW to the Institution District were statutory grants and that no contract between the parties existed. The Institution District and Delaware County have filed a Peti*169tion for Review in this Court contesting the Board of Arbitration of Claim’s action and, in the alternative, asking this Court, if we agree that the Board of Arbitration of Claims had no jurisdiction, to consider their Petition for Review as an original action in mandamus for an order directing DPW to pay the Institution District $1,060,844.55, apparently pursuant to Pa. R.A.P. 1504.1 DPW has filed preliminary objections to the suit in mandamus. We affirm the order of the Board of Arbitration of Claims; and we sustain DPW’s preliminary objections to the petition insofar as it seeks relief in mandamus.
Section 4 of the Act of May 20, 1937, P.L. 728, as amended, 72 P.S. §4651-4, provides that:
The Board of Arbitration [of Claims] shall have jurisdiction to hear and determine all claims against the Commonwealth arising from contracts hereafter entered into with the Commonwealth, where the amount in controversy amounts to $300.00 or more.
The Board of Arbitration of Claims, as we have noted, held that it was without jurisdiction to entertain the complaint because no contract existed between the complainants and DPW. The petitioners contend that the Public Welfare Code and DPW’s regulations promulgated thereunder create a contrac*170tual obligation on DPW’s part to fund the Institution District’s child care service programs. This argument is totally without merit. The Institution District is a body corporate created pursuant to Section 301 of the County Institution District Law, Act of June 24, 1937, P.L. 2017, as amended, 62 P.S. §2253. County Institution Districts are State agencies performing governmental functions; as such, they are subject to the control of the Commonwealth. Chester County Institution District v. Commonwealth, 341 Pa. 49, 17 A.2d 212 (1941). Section 405 of the Act just cited, 62 P.S. §2305, imposes a duty upon the Institution District to provide child care services. The grants of State funds made to county institution districts pursuant to Section 704 of the Public Welfare Code, mentioned at the outset of this opinion, flow from the State treasury “as funds specifically appropriated for disbursement by DPW directly to counties for use in the child welfare field.” Department of Public Welfare v. Harambee, Inc., 21 Pa. Commonwealth Ct. 430, 434, 346 A.2d 594, 597 (1975). Under the Public Welfare Code, DPW, with an exceptiion not here relevant, generally “aet[s] [only] as a conduit for the disbursement of funds to the counties....” Department of Public Welfare v. Harambee, Inc., supra, 21 Pa. Commonwealth Ct. at 435, 346 A.2d at 597. DPW’s obligation to make such grants derives from an obligation created by statute, and not from a contract between it and any institution district. See also, Department of Public Welfare v. Adams County, 30 Pa. Commonwealth Ct. 164, 373, A.2d 143 (1977).
Turning next to the petitioners’ claim in mandamus, we recall the axioms that mandamus is an extraordinary writ which may be used only to compel a performance of a purely ministerial or mandatory *171duty, and that mandamus lies only where there is a clear legal right in the plaintiff to the performance of the act sought to be required and a corresponding-duty in the defendant to perform it. Hilton v. State Employees’ Employment Retirement Board, 23 Pa. Commonwealth Ct. 639, 353 A.2d 883 (1976).
The petitioners say that Section 707 of the Public Welfare Code authorizes DPW to recoup excess payments only by deductions from the grant for the calendar year next following the year of excess payment. They contend that the 1974 overpayment was required to be recouped, if at all, by adjustment of the grant for 1975. They emphasize the word shall in Section 707’s statement that DPW “shall adjust one or more installments of the next annual grant in order to recover the amount of [excess grant payments for a given calendar year]. ...” The word shall may, however, be interpreted as either mandatory or directory. Francis v. Corleto, 418 Pa. 417, 211 A.2d 503 (1965). When referring to the time of doing something, shall has usually been considered as directory. Kowell Motor Vehicle Registration Case, 209 Pa. Superior Ct. 386, 288 A.2d 50 (1967). The Pennsylvania Supreme Court has stated that: “The provisions of a statute requiring public officers to act within a specified time are generally regarded as directory, unless time is of the essence of the thing to be done, or the statute indicates that the provision is to be regarded as mandatory.” Commonwealth ex rel. Fortney v. Wozney, 326 Pa. 494, 497, 192 A. 648, 649 (1937); Kowell Motor Vehicle Regulation Case, supra; Allegheny County v. Pennsylvania Public Utility Commission, 192 Pa. Superior Ct. 100, 159 A.2d 227 (1960). The Public Welfare Code does not stipulate that the provision of Section 707 relating to the time for recoupment is to be considered mandatory. Further*172more, the time for recoupment is not the essence of Section 707, the central purpose of which is to insure expeditious adjustments of excessive grants. Its purpose certainly was not that of creating a means by which county institution districts might retain funds to which they are not otherwise entitled under the Public Welfare Code. We therefore hold that the word shall as used in Section 707 is directory only and that DPW may properly make adjustments to grants within reasonable time following the year in which they have been made. In doing so we note that:
‘To hold that a provision is directory rather than mandatory, does not mean that it is optional — to be ignored at will. Both mandatory and directory provisions of the legislature are meant to be followed. It is only in the effect of non-compliance that a distinction arises. A provision is mandatory when failure to follow it renders the proceedings to which it relates illegal and void; it is directory when the failure to follow it does not invalidate the proceedings. (Emphasis in original.)
Kowell Motor Vehicle Registration Case, supra, 209 Pa. Superior Ct. at 390, 228 A.2d at 52.
Accordingly, we enter the following
Order
And Now, this 9th day of March, 1978, the order of the Board of Arbitration of Claims dismissing the complaint of Delaware County and the Delaware County Institution District is affirmed. It is further ordered that the Pennsylvania Department of Public Welfare’s preliminary objections to Delaware County’s and Delaware County Institution District’s Petition for Beview in the nature of mandamus be and they are hereby sustained,
Pa. R.A.P. 1504 provides that:
If a petition for review is filed against any person, where the proper mode of relief is an action in equity, replevin, mandamus or quo warranto, or a petition for declaratory judgment or for a writ of certiorari or prohibition, this alone shall not be a ground for dismissal, but the papers whereon the improvident matter was commenced shall be regarded and acted upon as a complaint or other proper process commenced against such person and as if filed at the time the improvident matter was commenced. The court may require that the papers be clarified by amendment.