Sullivan County Harness Racing Association, Inc. (colloquially known as and hereinafter referred to as Montieello) seeks an order, within the context of an action for a declaratory judgment, summarily determining that a certain contract between Montieello and City of Schenectady Off-Track Betting Commissi orí (hereinafter Schenectady), dated May 24, 1973 and providing for the interfacing of off-track bets accepted by Schenectady with the pari-mutuel pool at Montieello, is an existing right within the meaning of section 24 of chapter 346 of the Laws, of 1973 to the extent that Schenectady be compelled to continue to interface with Montieello while another harness track, Saratoga Raceway, is operating within the region assigned to Schenectady (L. 1973, ch. 346, § 27; amd. L. 1973, ch. 347, § 4, eff. July 1, 1973) and, further, that Montieello be permitted to retain 4% of the Schenectady off-track handle interfaced at Montieello.1 Next, Montieello *560seeks a stay of the trial of another action between it and New York City Off-Track Betting Corp. and others, presently pending in New York County until the determination of the issues herein.
At the time Monticello and Schenectady contracted for the interfacing of off-track betting, the agreement was silent as to the percentage of the gross off-track receipts to be retained by the track operator, it clearly being the understanding and intention of the parties that the State, which had statutorily made legal that (gambling) which is constitutionally condemned (N. Y. Const., art. I, § 9), would set by law the rate or percentage that would best promote off-track wagering by encouraging off-track commissions and racetracks to participate contractually in the raising of reasonable governmental revenues. On the date of the subject contract the authorized statutory percentage to be retained by Monticello was 1%%.2 This percentage, on July 1,1972, was increased to 4% of the first 25 million of the handle.3 The 1973 session of the New York State Legislature enacted article VI of the Pari-Mutuel Revenue Law, specifically section 4 of chapter 346 of the Laws of 1973 (Off-Track PariMutuel Betting Law, § 125) which provides that the statutory entitlement to harness tracks outside of a region, in which an off-track betting corporation is taking bets on tracks within that region, is 1% of regular bets and 2% of exotic bets. The same section and chapter of the Laws of 1973 created regions within which each of the counties of the State was placed. Schenectady was assigned to Region (5) which contains within it the harness track located at Saratoga Springs, New York. Chapter 659 of the Laws of 1973 provides that Schenectady may accept off-track wagers on races at any track in the State until such time as the harness track located within its assigned Region (5) and Schenectady mutually agree and implement an interfacing contract. Such an agreement has been implemented between Saratoga and Schenectady. Subdivision 4 of section 121 of the Off-Track Pari-Mutuel Betting Law (L. 1973, ch. 346, § 4) provides, in substance, that no regional corporation shall accept off-track wagers on races at any harness track located outside its region while a harness track, with which it has an agreement, is conducting a race meeting involving pari-mutuel betting.
Against this background it is the contention of Monticello that the provision of section 24 of chapter 346 of the Laws of 1973 which states, “ No existing right or remedy of any char*561acter shall be lost, impaired or affected by reason of this act ”, freezes its contractual right on or before the effective date of chapter 346 of the Laws of 1973 so as to entitle it to accept interfacing from Schenectady even when Saratoga Raceway is conducting a pari-mutuel race meeting within Region Five and, further, to retain 4% of the gross receipts that such interfacing generates. This contention, insists the defendant New York State Racing and Wagering Board (Board), overlooks the nature of the contract, of the contracting parties and the fact that the State, in the exercise of its police powers, has not only the right but the duty and obligation to interdict by statute in a manner that may impair private contractual rights, provided such interdiction is in the public interest.
We are herein dealing with a subject, gaming or wagering, that is prohibited by the provisions of the New York State Constitution and unless the Legislature permits, the operation of any racetrack in conjunction with pari-mutuel wagering is illegal. The permissive operation of such activities is only justified if it generates governmental revenue that inures to the benefit of all the people. The legislative permission is guardedly given and only under conditions and regulations imposed by the State which may be altered from time to time according to the legislative view of fairness (Finger Lakes Racing Assn. v. New York State Off-Track Pari-Mutuel Betting Comm., 30 N Y 2d 207). Further, all contracts are subject to law prescribing their effect on the conditions to be observed in their performance (Strauss v. Union Cent. Life Ins. Co., 170 N. Y. 349). Parties contracting in this State are presumed to contract in reference to the law of this State (Kasen v. Morrell, 6 A D 2d 816) and the laws of this State enter into, define and determine the contract (Ward v. Union Trust Co. of N. Y., 172 App. Div. 569). Building contracts, if not expressly then impliedly, are made with reference to local building codes and health regulations. Commercial contracts of any kind, unless the agreements provide otherwise, are made with the appropriate section of the General Business Law and/or Uniform Commercial Code in mind and such contracts are always construed in the light of that law (Dolman v. United States Trust Co. of N. Y., 2 N Y 2d 110). All contracts are made subject to the protective power of the State and whatever rights the parties to an agreement may have acquired, they are subservient to the paramount right of the State to intervene for the general good of the public (Matter of Department of Bldgs. of City of N. Y., 14 N Y 2d 291, and cases cited by court-at p. 297).
*562Such is the case herein. Monticello and Schenectady contracted with full knowledge that the rate or percentage that could be retained by the track operator was fixed by law. Both knew that such rate was subject to change. Indeed, the percentage of withholding was increased in 1972 from 1%% to 4%. Monticello readily accepted the increased amount and neither Schenectady nor the then Harness Racing Commission complained. The State has now altered the rate downward and Monticello cannot now be sustained in its view that the broad grandfathering language of section 24 of chapter 346 of the Laws of 1973 operates so as to freeze its contract with Schenectady requiring interfacing when Saratoga Raceway is operating its meet in Region Five and that the percentage of takeout remain at 4%. The law was not changed so as to make performance by the parties impossible. Performance is never excused by changes in the law, particularly when the law was in existence when the contract was made and the changes were foreseeable.
Finally, the court must acknowledge that harness racing and pari-mutuel betting, on as-well as offtrack, are regulated industries that operate outside constitutional prohibition b.y legislative fiat. It necessarily follows that constant vigilance by the appropriate agency charged with the' duty of regulation is required. Such regulatory power has been given to the State Racing and Wagering Board. The Board, acting in conformity with the Pari-Mutuel Law, as amended, has directed Schenectady to cease interfacing with Monticello when Saratoga Raceway is conducting its meeting. This act by the Board has support in the laws and is, therefore, conclusive (Matter of Swalbach v. State Liq. Auth. of State of N. Y., 7 N Y 2d 518, 526) and the sole test of judicial review is to determine whether the agency (Board) acted arbitrarily or capriciously (Matter of Fink v. Cole, 1 N Y 2d 48, 53). In my view, the directive to Schenectady was not so arbitrary or capricious as to warrant annulment.
However, the directive of the Board to Schenectady is stated in language requiring construction. On July 1, 1973 the Board, within the context of its decision and order regarding Schenectady’s plan of interfacing with Saratoga Raceway, stated: “ In addition, Schenectady was advised that in accordance with the restrictions of the new law (c. 346 L. 1973 and amendatory provisions), it would be required to cease accepting wagers on races at other harness tracks upon the implementation of the Saratoga interface.” This, in my view, incorrectly states the law.
*563Chapter 659 of the Laws of 1973 entitled “ An Act * * * in relation to continuing operation by the city of Schenectady of off-track pari-mutuel betting ”, effective July 1, 1973, in subdivision a thereof states, in substance, ‘ ‘ The city of Schenectady may continue to operate off-track pari-mutuel betting * * * until the board approves a plan of operation * * * and such plan of operation is implemented; provided, however, that during any period that the city of Schenectady continues to operate off-track pari-mutuel betting * * * it may accept off-track wagers on races at any harness track within the state * * * until such time as the harness track located within the Capital District and the city of Schenectady mutually agree * * * and such agreement is implemented.” 4 Section 4 of chapter 346 of the Laws of 1973 (Off-Track Pari-Mutuel Betting Law, § 121, subd. 4), also effective on July 1, 1973, states, in substance, as follows: “No regional corporation authorized to conduct off-track betting by the board shall accept off-track wagers on races at any harness track located without its region, while a harness track within its region is conducting a race meeting involving pari-mutuel betting ” (emphasis supplied). Clearly, since prior to July 1, 1973 Saratoga and Schenectady had not mutually agreed to an arrangement of interfacing, the Legislature enacted chapter 659 so as to permit Schenectady to continue to operate its off-track facility pending the culmination of such an agreement. When such a contract was concluded and approved by the Board, as it was by decision and order of the Board dated July 19, 1973, and implemented on July 16, 1973 pursuant to telegram approval by the Board on July 14, 1973, it was the legislative intent that Schenectady thereafter conduct its off-track facility in accordance with the provisions of section 4 of chapter 346 of the Laws of 1973 (OffTrack Pari-Mutuel Betting Law, § 121, subd. 4). That section only proscribes the acceptance of off-track wagers on races at harness tracks located outside the region within which the betting facility is located while a harness track within its region is conducting a meeting involving pari-mutuel betting. It does not prohibit such activity when a harness track located within the region is not conducting a race meeting. It does not, as urged by the Board, “ bar the further operation of the agreement between Schenectady and Monticello.”
The provisions of chapter 346 of the Laws of 1973, with respect to the subject contract, prohibit Schenectady from interfacing with Monticello whenever Saratoga Raceway is conduet*564ing a race meeting in conjunction with pari-mutuel wagering so long as the agreement for interfacing between Saratoga and Schenectady remains in force. "When Saratoga is closed, Schenectady may interface with Monticello pursuant to the terms of their contract dated May 24, 1973, but Monticello may only retain the percentage of regular and exotic betting as authorized by section 4 of chapter 346 of the Laws of 1973 (Off-Track Pari-Mutuel Betting Law, § 125).
To the extent that this decision holds that the subject contract survives under the conditions recited above and since this relief is less than requested, the court would be constrained to grant partial summary judgment (CPLR 3212, subd. [e]). However, since partial summary judgment implies there are remaining issues and since all parties agree there are no questions of fact requiring severance, the court declares the rights of the parties to be as determined above, i.e., the subject contract survives but Schenectady may interface with Monticello only when Saratoga is not operating a race meeting in Region Five, and when such interfacing takes place Monticello may only retain the percentages prescribed by chapter 346 of the Laws of 1973, and the court directs that judgment be entered accordingly.
The branch of the motion seeking an order to stay the trial of Sullivan County Harness Racing Assn. v. New York City Off-Track Betting, presently pending in New York County, is denied.
. On November 2, 1973 Justice John H. Pennock granted Montieello’s motion for a temporary injunction compelling Schenectady to continue to interface with movant and, further, restrained and enjoined the New York State Racing and Wagering Board from prohibiting Schenectady to so interface. An appeal was filed which had the effect of imposing an automatic stay of the stay of Judge Pennock. Montieello, thereafter, made application to Justice Gbbenblott of the Appellate Division, Third Department, for an order vacating the automatic stay. It was vacated and on November 13, 1973 the Appellate Division continued Justice Gbbenblott’s order pending the determination of this motion.
. Section 1 of chapter 422 of the Laws of 1971.
. Section 2 of chapter 534 of the Laws of 1972.
. Italics contained in the law as set forth in the Session Laws of 1973.