OPINION OF THE COURT
Robert C. Williams, J.In this article 78 proceeding, petitioner seeks a judgment annulling that portion of a decision and order rendered by respondent Public Employment Relations Board (PERB) which declares that allocation of positions to salary grades is a mandatory subject of collective bargaining.
On the return date of this special proceeding, this court, with the consent of the parties herein, ordered that James R. Hannon, individually and as president of the New York State *208Supreme Court Officers Association, the New York State Court Officers Association, the New York State Court Clerks Association, and the Court Clerks Benevolent Association be permitted to intervene in this proceeding. These intervening respondents join with PERB in seeking confirmation of PERB’s decision and order. In addition, the intervening respondents have asserted various counterclaims.
Effective April 1, 1977, the State of New York assumed the obligation of funding the courts of record in this State. (L 1976, ch 966, §2; Judiciary Law, §39.) These courts had previously been funded by the various localities in which they were located. One of the principal purposes of the establishment of the unified court system was expressed by the Legislature as follows: "Placing at the state level the ultimate fiscal responsibility for the courts of the unified court system enumerated in this act will significantly enhance their effective operation by enabling one legislative body to make decisions concerning the amount of moneys to be appropriated based upon a comprehensive view of the relative needs of the various courts. Funding by a single fiscal authority will enable the allocation of moneys and manpower when needed unimpeded by artificial local boundaries and the diverse competing needs of local governmental agencies” (L 1976, ch 966, § 1).
As part of the unification of the court system, the Legislature directed the Administrative Board of the Judicial Conference to formulate a classification plan of all nonjudicial officers and employees who became employees of the State. The classification of positions was to be in accordance with the duties and responsibilities required to be performed in each respective title. (See Judiciary Law, § 39, subd 8.) This classification plan was finally formulated and adopted on May 28, 1979.
Prior thereto, petitioner’s predecessor, Honorable Richard J. Bartlett, entered into collective negotiations with the intervening respondents so that an agreement could be reached to succeed the former agreements negotiated by said respondents with the City of New York. An impasse developed which resulted in the intervening respondents’ filing of an improper practice charge with respondent PERB.
The intervening respondents alleged that Judge Bartlett had refused to negotiate with respect to various mandatory subjects of negotiation. These subjects included the classifica*209tion of positions (referred to above) and the allocation of these positions to State salary grades.
Judge Bartlett filed an improper practice countercharge with PERB alleging that the intervening respondents had failed to negotiate in good faith. Judge Bartlett argued that classification and allocation were nonmandatory subjects of collective bargaining. Therefore, the intervening respondents were improperly demanding the negotiation of these items.
By decision and order dated August 16, 1979, PERB ruled that classification was a nonmandatory subject of collective bargaining. PERB held that classification "is clearly a personnel management tool which facilitates the ascertainment of staffing needs” and does not have a direct impact upon terms and conditions of employment. This finding is not sought to be reviewed herein.
It is the second portion of PERB’s decision with which we are concerned herein. PERB held that the allocation of job classifications to salary grades is a mandatory subject of negotiation and ordered petitioner to negotiate in good faith as to that item. PERB stated that "absent a clear legislative intent to the contrary or unusual policy considerations, salary grade allocation is a mandatory subject of negotiations”.
PERB’s determination was affected by an error of law and, therefore, must be annulled. Allocation of job classifications to salary grades is a matter which the Legislature has specifically entrusted to the Administrative Board of the Judicial Conference. (See NY Const, art VI, § 28, as to the functions of the Administrative Board of the Judicial Conference and the supervision of the unified court system.)
The issue as to allocation is dependent for its resolution on the interpretation of various legislative enactments which are outside the Taylor Law. PERB’s interpretation of these enactments resulted in the above-stated conclusion.
It is clear that an administrative agency’s interpretation of a statute which it is responsible for administering is entitled to great weight. (Matter of Howard v Wyman, 28 NY2d 434.) However, the agency may not under the guise of administering the statute ascribe a different or unreasonable meaning to its terms. (Matter of Rosenbluth v Finkelstein, 300 NY 402, 405.) Freedom to construe is not freedom to amend. (1 NY Jur, Administrative Law, § 91.)
Statutory construction is the function of the court. (Matter *210of Mounting & Finishing Co. v McGoldrick, 294 NY 104; 1 NY Jur, Administrative Law, § 191.) Although PERB’s interpretation of the Taylor Law is entitled to due regard from the courts, that agency’s interpretation of the Judiciary Law is not a matter within its special expertise. While its interpretation has been considered, it is not controlling.
It is a fundamental rule of statutory construction that a statute is to be construed as a whole. A single sentence or phrase is not to be detached from the whole so as to be given a special meaning at variance with the general purpose and spirit of the enactment. All portions of the statute are to be harmonized and effect given to all provisions of the statute. (McKinney’s Cons Laws of NY, Book 1, Statutes, §§ 97, 98.)
Subdivision 8 of section 39 of the Judiciary Law provides in pertinent part that: "The administrative board in accordance with section two hundred nineteen of this article shall determine * * * the salary grade of each employee who becomes an employee of the state of New York pursuant to this section; provided, however, nothing herein contained shall be deemed to diminish: (i) the right of any employee organization to negotiate wages or salaries pursuant to article fourteen of the civil service law” (emphasis added).
PERB and respondents place their principal reliance on the italicized phrase commencing with "provided, however”. It is suggested that petitioner’s unilateral allocation diminishes the employee’s rights under the Taylor Law. However, that interpretation fails to give due regard to, in fact it ignores, the legislative mandate requiring the Administrative Board to determine the salary grade of each employee.
The statute is clear and unambiguous. The Administrative Board is required to determine the salary grade of each employee who is becoming a member of the unified court system. Former section 219 of the Judiciary Law (now Judiciary Law, § 37, see L 1978, ch 156, § 9), at subdivision 2 thereof, provided that "All state paid positions in the competitive, non-competitive and labor classes in the unified court system shall be allocated to a salary grade by the administrative board of the judicial conference” (emphasis added).
There is no mention of this allocation being subject to the process of collective negotiation. Such a process would tend to undermine the goals sought to be attained by unification. Rather than being determined by "the diverse competing needs of local governments” (L 1976, ch 966, § 1), salaries of *211employees of the unified court system would be determined by the strength of their respective bargaining unit. Such a result is clearly not compatible with a unified court system and the legislative purposes quoted supra.
Furthermore, petitioner’s unilateral allocation of salary grades does not deprive the intervening respondents of their rights under the Taylor Law. An employee’s salary within each salary grade will remain a subject of negotiation as will other terms and conditions of employment. Similarly, percentage increases of the minimum and maximum salary, i.e., cost of living increases, would presumably be negotiable.
PERB, in its decision, states that section 24 of chapter 158 of the Laws of 1970 is applicable solely to the executive branch. However no such limitation is found therein. Section 24 provides that "[T]he legislature finds and declares that allocations and reallocations to salary grades of positions in the classified service of the state are not terms and conditions of employment under article fourteen of the civil service law.” A more clear statement of legislative intent cannot be found.
Accordingly, the allocation of job classification to salary grades is not a mandatory subject of negotiation. The decision and order of PERB is annulled to the extent that it requires petitioner to negotiate allocation of positions.
The affirmative defenses and counterclaims asserted by respondent and the intervening respondents are dismissed. The failure to appoint an impartial review board and to promulgate its rules of procedure presents a nonjusticiable controversy. Such a claim is premature in that respondents’ claim of denial of due process and equal protection is speculative at the present time.
The relief sought by petitioner is granted.