
557 F.Supp. 1077 (1983)
STATE OF CONNECTICUT, DEPARTMENT OF INCOME MAINTENANCE
v.
Richard S. SCHWEIKER, Secretary, and the United States Department of Health and Human Services.
Civ. No. H-82-146.
United States District Court, D. Connecticut.
February 17, 1983.
*1078 Edmund C. Walsh, Asst. Atty. Gen., Hartford, Conn., Charles A. Miller, Carolyn F. Corwin, Covington & Burling, Washington, D.C., for plaintiff.
Linda Lager, Asst. U.S. Atty., New Haven, Conn., for defendants.

RULING ON CROSS-MOTIONS FOR SUMMARY JUDGMENT
BLUMENFELD, Senior District Judge.

I. PROCEDURAL HISTORY
In this suit, the State of Connecticut challenges the final administrative decision by the Department of Health and Human Services (HHS) that Connecticut's expenditures to the privately owned Middletown Haven Rest Home are not eligible for federal reimbursement under the Medicaid program, Title XIX of the Social Security Act (codified as amended at 42 U.S.C. §§ 1396-1396m (1976 & Supp. IV 1980) and 42 U.S. C.A. §§ 1396-1396n (West 1974 & Supp. 1981)).
HHS[1] advanced funds quarterly to Connecticut for expenses for patient care at Middletown Haven Rest Home. The advances covered the period from the home's opening in January 1977 through September 1979. This advance of funds was pursuant to 42 U.S.C. § 1396b(d)(2) (1976), as Connecticut had identified Middletown Haven as an "intermediate care facility" (ICF) eligible for reimbursement under 42 U.S.C. § 1396d(a)(15) (1976). In 1980, following an audit of Middletown Haven covering the above time period, the Health Care Financing Administration (HCFA) of HHS decided that the expenses at Middletown Haven had in fact not qualified for reimbursement because Middletown Haven, though an ICF, was also an "institution for mental diseases" (IMD), 42 U.S.C. §§ 1396d(a)(15), 1396d(a)(B) (1976). HCFA thus disallowed the federal reimbursement. Connecticut appealed this decision to the HHS Departmental Grant Appeals Board. The board sustained HFCA in Decision No. 231, dated November 30, 1981 (hereinafter, Decision 231). Having made this decision, HHS is required to offset the disallowed payments from future quarterly advances. 42 U.S.C. § 1396b(d)(2) (1976).[2] Connecticut appeals this final administrative decision.


*1079 II. JURISDICTION
A threshold matter is this court's jurisdiction.[3] The Board's decision is a "final agency action for which there is no other adequate remedy in a court." Administrative Procedure Act (APA) § 704, 5 U.S.C. § 704 (1976). Accordingly, judicial review is available unless the particular statutes concerning the Board's action "preclude judicial review." APA § 701(a), 5 U.S.C. § 701(a) (1976). Judicial review is not deemed forbidden unless the statute clearly forbids review. Abbott Laboratories v. Gardner, 387 U.S. 136, 140-41, 87 S.Ct. 1507, 1511, 18 L.Ed.2d 681 (1967). Here, 42 U.S.C.A. § 1316(d) (West Supp. 1981) requires the Secretary to review disallowances but is silent on further review in the courts. Accordingly, review seems permitted by the doctrine of Abbott Laboratories. Further, the court in County of Alameda v. Weinberger, 520 F.2d 344, 347-49 (9th Cir.1975) (Hufstedler, J., joined by Browning and Koelsch, JJ.), in considering the text, legislative history, and policy of section 1316(d), found no indication that Congress intended to preclude judicial review.[4]
Review of actions under section 1316(d) lies in the district court, which has subject matter jurisdiction by 28 U.S.C. § 1331 (Supp. IV 1980) (amending 28 U.S.C. § 1331 (1976)). See Alameda, 520 F.2d at 347, 349 (implicitly assuming that review under section 1316(d) lies in district court, and upholding such review). See also K. Davis, Administrative Law Treatise § 23.03-1 at 373 (Supp.1982) (provision in APA section 703 for review in "court of competent jurisdiction" means, in absence of contrary statute, review in district court, which has general jurisdiction under 28 U.S.C. §§ 1331, 1337).[5]

III. THE PRESENT MOTIONS
In its complaint, Connecticut challenges HHS' action in various ways. First, the finding that Middletown Haven Rest Home was an IMD is allegedly contrary to statute, ¶¶ 19-21, contrary to regulations, ¶¶ 23-24, and based on arbitrary criteria (of which Connecticut had insufficient notice) for classifying facilities as IMDs, ¶ 26. Next, Connecticut attacks the alleged retroactive nature of the disallowance. ¶ 28. Finally, Connecticut challenges the Board's action as not supported by substantial evidence. ¶ 30.
Connecticut and HHS have both moved for summary judgment. There is some confusion over whether Connecticut's claim concerning substantial evidence is before *1080 the court on these motions. See Defendant's Brief at 22 n. 10; Plaintiff's Reply Brief at 16 n. 1; Defendant's Reply Brief at 2 n. *; Plaintiff's Supplemental Brief at 6 n. *.[6] However, the issue of statutory construction, which is definitely before the court on these motions, is sufficient to decide the motions.

IV. STATUTORY CONSTRUCTION: THE VARIOUS POSITIONS
This case depends on the meaning of "institution for mental diseases" (IMD) in the Medicaid statute. The reason is that Middletown Haven qualifies for federal payments as an "intermediate care facility" (ICF) unless it is also an IMD.
The Medicaid statute provides for the federal government to share with states the costs of "intermediate care facility services (other than such services in an institution for tuberculosis or mental diseases)." 42 U.S.C. § 1396d(a)(15) (1976). An "intermediate care facility" (ICF) is
an institution which (1) is licensed under State law to provide, on a regular basis, health-related care and services to individuals who do not require the degree of care and treatment which a hospital or skilled nursing facility is designed to provide, but who because of their mental or physical condition require care and services (above the level of room and board) which can be made available to them only through institutional facilities, [and also meets the Secretary's care, safety, and sanitation standards] ....
42 U.S.C. § 1396d(c) (Supp. IV 1980) (amending 42 U.S.C. § 1396d(c) (1976)). The statute repeats that the federal payments do not include "any such payments with respect to care or services for any individual who has not attained 65 years of age and who is a patient in an institution for tuberculosis or mental diseases." 42 U.S.C. § 1396d(a)(B) (1976). Thus, though ICFs in general are eligible for federal payments, ICFs which are also IMDs are ineligible.
The Grant Appeals Board, while it accepted Middletown Haven's ICF status, disallowed funds on the ground that Middletown Haven was also an IMD. Decision 231 at 35-39. In determining whether Middletown Haven was an IMD, the Board followed HHS regulations which define an IMD as a facility with the "overall character" of being "primarily for the care and treatment of individuals with mental diseases."[7]Id. at 39. The Board found this definition satisfied by a combination of *1081 facts. The most important fact was that a large majority of the patients were "mental" patients. Id. at 36-37. Other facts included Middletown Haven's license to care for persons with psychiatric conditions, Middletown Haven's having advertized itself as a facility specializing in the care of persons with mental diseases, and the presence of three staff psychiatrists who made weekly consultations. Id. at 36.
The Board's decision can be upheld only if its classification of Middletown Haven was based on appropriate factors. Accordingly, HHS maintains in this court that an ICF is an IMD if it exists primarily to care for mental patients. Defendant's Brief at 9-10. Connecticut, in contrast, asserts that an "IMD" means a "state mental hospital or its private equivalent." Plaintiff's Brief at 17. Connecticut is substantially correct. An IMD means a mental hospital, which in turn means, at the least, a facility providing total care to mental patients.[8]

V. STATUTORY CONSTRUCTION: ANALYSIS

A. The Ambiguity of the Term "IMD"

The phrase "institution for mental diseases" used in sections 1396d(a)(15) and 1396d(a)(B) is not self-explanatory. "Institution" suggests a total care situation, probably for a long time.[9] Consider, for example, the meaning of "to institutionalize" someone. "Institution" also suggests a large, impersonal establishment. Contrast the more neutral term "facility," used often elsewhere in the statute. Still, "institution" might simply be used in a neutral sense, as a synonym for "facility"; or it might, for example, denote a fairly high but not total level of care. Further, the phrase "for mental diseases" might require only that patients have mental diseases, or it might require also that some level of psychiatric treatment be given.
To discover the meaning of "IMD," first the statute's text and then its legislative history will be examined.

B. Clues from the Statute's Text

The statute's text is only slightly helpful in resolving the ambiguous meaning of "IMD." Three sections are relevant: sections 1396d(a), 1396d(c), and 1396a. 42 U.S. C.A. §§ 1396a, 1396d (West 1974 & Supp. 1981).
Section 1396d(a). By excluding services in an IMD from the general cost sharing of ICF services, section 1396d(a)(15), quoted supra p. 6, implies that ICFs may also be IMDs, but does not clarify under what circumstances this would happen. Parallel IMD exclusions in parts (1) and (4) of section 1396d(a), dealing with inpatient hospital services and skilled nursing facility services respectively, imply that these other facilities too can be IMDs, but again do not clarify just how this would happen. The same message comes from part (14), which explicitly covers "inpatient hospital services, skilled nursing facility services, and intermediate care facility services for individuals 65 years of age or over in an institution for tuberculosis or mental diseases."
Section 1396d(c). Section 1396d(c), quoted supra p. 1080, defines an ICF as providing care required by patients' "mental or physical condition." This language suggests that people with mental and physical conditions ("mental patients" and "physical *1082 patients" respectively) should be treated equally. From this viewpoint, a definition of an IMD as an institution maintained primarily for mental patients would be undesirable because it would discriminate fairly directly against mental patients. A definition of an IMD at least partly in other terms, such as a requirement of total care, would discriminate much less efficiently against mental patients. Other possible defining criteria can be similarly evaluated. For example, the criterion that the facility provide psychiatric care would discriminate against mental patients more than the criterion that the facility provide total care, but less than the criterion that the facility exist primarily for mental patients.
Section 1396a. Section 1396a(21) lists "community mental health centers" as an example of "alternatives to care in public institutions for mental diseases." This section thus suggests that a "community mental health center" is not an IMD. However, it is not immediately clear what a "community mental health center" is, and whether Middletown Haven is one. Further, Congress in this section may have contemplated a private community mental health center, which merely because it is private is not a "public institution for mental diseases" (emphasis added).[10]

C. Legislative History

Legislative history, by explaining the purpose behind the IMD exclusion, indicates a definition for "IMD." Further, by illuminating two of the three suggestive statutory sections just discussed, legislative history further supports this definition. Relevant legislation occurred in 1950, 1960, 1963, 1965, 1967, 1971, and 1972.[11]

1. The Purpose of the IMD Exclusion

The legislative history reveals two broad points. First, by the IMD exclusion, Congress meant to exclude state "mental hospitals" because the states were already funding them. Next, by a "mental hospital" Congress meant, at the least, a facility which provides total care to mental patients.
An IMD exclusion for Social Security was first enacted in 1950 for the old-age medical assistance program of Title I. 1950 Act, sec. 303, § 6, 64 Stat. at 549. This legislation provided for payment for medical care of individuals aged 65 or older in public and private institutions, excluding any individual "who is a patient in an institution for *1083 tuberculosis or mental diseases."[12] The House Committee on Ways and Means explained that the then current law permitted assistance to persons in private institutions but not those in public ones. However, the "needy aged persons who are chronically ill" could not find affordable private institutions for care. Federal payments for care in public institutions would encourage the admission of needy persons to existing public facilities as well as the development of additional public facilities. H.R.Rep. No. 1300, 81st Cong., 1st Sess. 42 (1949). The bill however excluded "assistance to persons residing in public or private institutions for mental illness and tuberculosis, since the States have generally provided for medical care of such cases." Id.
In 1965, Congress enacted the Medicaid program as Title XIX of the Social Security Act. This Title contains the provisions at issue in this case. Congress included in 1965 the same IMD exclusion that is now codified at 42 U.S.C. § 1396d(a)(B), quoted supra p. 1080. 1965 Act, sec. 121, § 1905(a)(B), 79 Stat. at 352. In contrast to the 1950 IMD exclusion (which applied in a title dealing only with individuals aged 65 and over), the 1965 IMD exclusion by its terms affected only individuals under age 65.[13]
Congress excluded IMDs from funding because the states had traditionally funded care in mental hospitals. The Senate Finance Committee and the House Ways and Means Committee both stated that the "reason for this exclusion was that long-term care in such hospitals had traditionally been accepted as a responsibility of the States." S.Rep. No. 404, Part I, 89th Cong., 1st Sess. 144, reprinted in 1965 U.S.Code Cong. & Ad.News 1943, 2084; H.R.Rep. No. 213, 89th Cong., 1st Sess. 126 (1965).[14] Similarly, Secretary Celebreeze explained: "Under the bill, institutions providing care primarily for mental or tuberculosis patients are excluded from participation. The main reason for this exclusion is that most of these hospitals are public institutions and are supported by public funds. Nor did it seem reasonable to cover private but not public institutions." Social Security; Medical Care for the Aged Amendments: Hearings *1084 on H.R. 11865 Before the Senate Comm. on Finance, 88th Cong., 2d Sess. 108 (1964). See also House Comm. on Ways and Means, 89th Cong., 1st Sess., Summary of Major Provisions of Medical Assistance for the Aged Program 1 (Comm.Print 1965) ("The Federal Government does not participate in respect to medical services furnished ... to patients in mental or tuberculosis hospitals.")[15]
Courts have echoed this interpretation of the 1965 IMD exclusion as referring to hospitals. A three-judge district court upheld the IMD exclusion against an equal protection challenge by finding a rational basis for the exclusion in Congress' "belief ... that care of the mentally ill in state hospitals was the responsibility of the states." Legion v. Richardson, 354 F.Supp. 456, 459 (S.D.N.Y.) (Stewart, J., joined by Feinberg, Cir. J., and Gurfein, J.), aff'd sub nom. Legion v. Weinberger, 414 U.S. 1058, 94 S.Ct. 564, 38 L.Ed.2d 465 (1973). In another equal protection case, the Supreme Court noted this policy behind the 1965 IMD exclusion to infer by analogy a rational basis for the exclusion of Title XVI Supplemental Security Income benefits from persons aged 21 through 64 residing in public mental institutions. Schweiker v. Wilson, 450 U.S. 221, 236-37 & n. 19, 101 S.Ct. 1074, 1084 & n. 19, 67 L.Ed.2d 186 (1981) (quoting Legion v. Richardson as well as "hospital" language in the Senate report).
Just what did Congress mean by a "mental hospital"? Though Congress spoke of the long-term care given in hospitals for tuberculosis and mental illness, a facility apparently did not have to give long-term care in order to be an IMD. As mentioned above, the 1965 Act did not exclude IMD coverage for individuals aged 65 and over. In urging IMD coverage for such individuals, supporters of the bill interpreted the IMD exclusion as prohibiting payments for care even in hospitals which gave primarily short-term care. Statement of Sen. Ribicoff,[16] 111 Cong.Rec. 15801, 15805 (1965) (amendment was needed to remove the limitation on treatment for aged recipients "in mental or tuberculosis hospitals"; such limitation was reasonable only "based on the [outdated] assessment that the patients required long-term institutional care  which was a State responsibility"); see Statement of Sen. Carlson, 110 Cong.Rec. 21349 (1964) (asserting both that "[w]e have made great strides in the field of mental disease and in the field of tuberculosis" and that "we still prohibit long-term care and/or care in institutions specializing in these two diseases").
So long-term care was not a defining criterion of an IMD. Neither apparently was any particular level of psychiatric care. As late as 1965, Congress observed that many mental hospitals provided primarily *1085 custodial care rather than treatment leading to cure. See S.Rep. No. 404, Part I, 89th Cong., 1st Sess. 147, reprinted in 1965 U.S.Code Cong. & Ad.News 1943, 2086 ("there is great need for increased professional [mental health] services in hospitals"), and id. at 146, 1965 U.S.Code Cong. & Ad.News at 2086 (stressing need for states to move ahead with comprehensive mental health plans as contemplated in the 1963 Act, in conjunction with H.R.Rep. No. 694, 88th Cong., 1st Sess., reprinted in 1963 U.S. Code Cong. & Ad.News 1054, 1064 (considering the 1963 Act) ("Only a small percentage of the [state mental] institutions can be said to be therapeutic and not merely custodial."). Therefore, by "mental hospital" Congress did not have in mind any level of psychiatric care.
Though a "mental hospital" did not, in Congress' contemplation, have to provide long-term care or any particular level of psychiatric care, it did have to provide total care.[17] The term "hospital" connotes total care. Further, Congress' image of a state mental hospital was an institution which completely controlled the lives of its patients. H.R.Rep. No. 694, 88th Cong., 1st Sess., reprinted in 1963 U.S.Code Cong. & Ad.News 1054, 1064 (the state mental hospital, the treatment for most mentally ill patients, is the modern means for society to isolate, confine, and reject the mentally ill). Further, in 1971, when Congress added ICF coverage to Title XIX,[18] Congress contrasted the level of care of an ICF with that of a hospital. An ICF was defined as providing care beyond room and board but below that of a hospital or skilled nursing home. 1971 Act, sec. 4, § 1905, 85 Stat. at 809 (codified as amended at 42 U.S.C. § 1396d(c) (Supp. IV 1980), quoted supra p. 1080). ICF care coverage was intended for persons who "in the absence of intermediate care would require placement in a skilled nursing home or mental hospital." Statement of Senate Finance Committee, printed in Statement of Sen. Long, 117 Cong.Rec. 44721 (1971).[19]
So far, it appears that Congress meant the IMD exclusion to apply only to facilities providing total care to mental patients.[20] This interpretation answers the argument put forth by HHS that a state might transfer mental patients in large numbers from hospitals to ICFs such as Middletown Haven in order to increase federal cost sharing. Since ICFs provide less than total care, Congress did not intend to exclude coverage of their patients. Such transfers therefore would not violate Congress' purpose. Of course, only patients who do not need total care should be transferred. But the Secretary can mandate standards to that effect, 42 U.S.C. § 1396d(c) (Supp. IV 1981), and the state plans are already required to ensure that ICF patients are receiving enough care, 42 U.S.C. § 1396a(a)(31) (1976).


*1086 2. Various Sections Explained

Legislative history, by illuminating two of the three suggestive statutory sections discussed supra pp. 1081-1082, further supports the interpretation of "IMD" as, at the least, a facility providing total care to mental patients. In the case of section 1396d(a), legislative history weakens arguments by HHS that an IMD cannot be just a mental hospital. In the case of section 1396a, legislative history strengthens and clarifies the inference that "community mental health centers" cannot be IMDs.
Section 1396d(a). In 1965, Congress covered inpatient hospital services and skilled nursing facility services by enacting parts (1) and (4) respectively of section 1396d(a). In 1971, Congress covered ICF services by enacting part (15) of this section. All three parts explicitly exclude coverage for "services in an institution for tuberculosis or mental diseases." HHS infers that, since ICFs and skilled nursing facilities may be IMDs, an "IMD" cannot be restricted to a mental hospital. However, these sections, simply read, speak to the case in which an inpatient hospital facility, skilled nursing facility, or intermediate care facility may also happen to be an IMD.[21] At least in the case of an ICF which is also an IMD, one facility would be giving two different kinds of care (total care and non-total care). For such a facility, none of the care would be covered.[22]
HHS argues that such a reading is strained, because it would require that "Congress' references to e.g., intermediate care facility services [excluded as being provided in IMDs], is to a particular level of services provided outside a facility created to provide such service." Defendant's Brief at 11. However, the ICF services in question would not be provided outside an ICF; rather, they would be provided inside a facility that is both an ICF and an IMD.
Further, some legislative history of the 1971 Act supports this reading. Senator Bellmon explained that a skilled nursing facility might provide not only skilled nursing care but also intermediate (ICF) care. In that case, the ICF care given would qualify for reimbursement even though it was given in a skilled nursing facility. Statement of Sen. Bellmon, 117 Cong.Rec. 44720, 44721 (1971). Thus, at least in 1971, Congress was considering the technical problem of coverage in one facility which gave two kinds of care. Therefore, it seems reasonable that in 1965 Congress took care to say that inpatient hospital services and skilled nursing facility services that happened to take place in a facility that was also an IMD were not covered, and that in 1971 Congress said further that ICF services that happened to take place in a facility that was also an IMD were not covered.
HHS points also to section 1396d(a)(14), which explicitly covers "inpatient hospital services, skilled nursing facility services, and intermediate care facility services for individuals 65 years of age or over in an institution for tuberculosis or mental diseases." Again, it seems to HHS that this section reads unnaturally if an IMD is a mental hospital. Defendant's Brief at 12. However, since the section simply restores to those over 65 the coverage in IMDs for three particular services which was generally *1087 excluded in the sections discussed above, the section does not seem at all unnatural.[23]
Congress enacted this section in the 1972 Act, sec. 297, 86 Stat. at 1459-60. Because inpatient hospital services, skilled nursing facility services, and intermediate care facility services were already covered by sections 1396d(a)(1), (4), (15), and the IMD exclusion in those sections and in section 1396d(a)(B) applied only to those under 65, section 1396d(a)(14) was not strictly necessary. It was added rather for clarity, especially to make clear that the unusual situation of an IMD giving ICF services for someone 65 or over was covered. S.Rep. No. 1230, 92d Cong., 2d Sess. 321 (1972).
HHS points to a conference report which describes the provision as providing that "when a State chooses to cover individuals age 65 and over in institutions for ... mental diseases it must cover such care in intermediate care facilities as well as in hospitals and skilled nursing homes." H.R. Rep. No. 1605 (Conference Report), 92d Cong., 2d Sess. 65, reprinted in 1972 U.S. Code Cong. & Ad.News 5370, 5397. This report seems to consider that institutions for mental disease may as a regular matter be hospitals, nursing homes, and intermediate care facilities. HHS thus argues that an IMD cannot be limited to a mental hospital. Defendant's Brief at 13. However, this conference report is confused. The report improperly states that the provision requires coverage of ICF services in IMDs if a state covers hospital and skilled nursing home services in IMDs, when such coverage is optional, see 42 U.S.C. § 1396a(a)(13) (1976 & Supp. IV 1980). Further, though the amendment only applies to Medicaid, the report titles it as applying to "Medicare." The conference report considered this amendment very briefly, and it dealt with many amendments, all in a year-end rush, Plaintiff's Reply Brief at 11 n. 3. The report is thus not persuasive on this technical point.
Section 1396a. Section 1396a(a)(21) gives "community mental health centers" as an example of an alternative to "public institutions for mental diseases." It was noted, supra p. 11, that this language, while suggesting that Middletown Haven is not an IMD, is not conclusive for two reasons. First, "community mental health center" is undefined. Second, Congress in this section may have contemplated community mental health centers as privately run; in that case, they would be alternatives to "public institutions for mental disease" simply because they were private, not because they were not institutions for mental disease. Legislative history speaks to both of these questions, establishing that a community health center is not an IMD and clarifying what a community mental health center is.
A good source of what Congress meant by "community mental health centers" in 1965 is the Community Mental Health Centers Act of 1963.[24] In the 1963 Act, Congress envisioned community mental health centers as follows:
The patient services included in such a center would include an emergency psychiatric unit, inpatient services, outpatient services, day and night care, foster home care, rehabilitation programs, and general diagnostic and evaluation services. In addition, the center would offer consultative services to other community agencies and organizations such as information programs in schools and through other public and private agencies.

*1088 The community mental health center would build on and be a part of the existing resources and programs of the community  public and private  rather than be isolated from them. For example, the psychiatric ward of a general hospital would be the major focus of the center in many communities. Existing outpatient mental health clinics might also form the nucleus of a center. Each community would have a major voice in determining the basic pattern of services to be offered through its own mental health center.
H.R.Rep. No. 694, 88th Cong., 1st Sess., reprinted in 1963 U.S.Code Cong. & Ad. News 1054, 1065-66. Since community mental health centers could "build on and be a part of ... public and private" resources, Congress apparently envisioned them as quite free to be either public or private. Thus, in section 1396a(a)(21) Congress did imply that community mental health centers (which may indeed be public) are not "institutions for mental disease."[25]
The quotation above characterizes community mental health centers in terms of the range of services provided, the community-based resources used, and the community's voice in the center's control. Section 1396a(a)(21) strongly suggests that an establishment meeting this description is not an IMD. This italicized proposition could be considered largely as an example of the more general proposition that an IMD must provide total care. Indeed, of the various services listed for a community mental health center to provide, only one, "inpatient services," involves total care.[26] This proposition does however suggest other limits on what an IMD can be. For this case, we need not discuss these limits.[27] At any rate, the italicized proposition above cuts directly against HHS' position that any institution maintained primarily for mental patients is an IMD.

D. Conclusion

At first glance, the term "institution for mental diseases" (IMD) is quite uncertain in meaning. The legislative history behind the enactment in 1965 of the IMD exclusion in section 1396d(a)(B) indicates that an IMD is a "mental hospital." Further legislative history reveals that a "mental hospital" means, at the least, a facility which provides total care to mental patients.
Other sections of the Medicaid statute, viewed together with legislative history, support this interpretation of "IMD." Section 1396d(c), by suggesting equal treatment of mental and physical conditions, favors this interpretation because it discriminates less effectively against mental patients than does an interpretation, as proposed by HHS, based solely on whether the institution is maintained primarily for mental patients. Section 1396a(a)(20) implies that a "community mental health center" is not an IMD. Section 1396d(a), parts (1), (4) and (15), which exclude care in IMDs from certain covered care, and part (14), which specifically includes these same types of care in IMDs for persons aged 65 or over, do not read unnaturally with this interpretation of "IMD."
*1089 Therefore, I hold that an IMD is a mental hospital, which in turn means, at the least, a facility which provides total care to mental patients.

VI. DEFERENCE TO HHS
HHS asserts that its regulations interpreting the statute deserve deference.[28] The parties argue back and forth about whether HHS' regulations and practice have been clear and long-standing. That argument need not be considered, for even a clear, long-standing agency interpretation would not deserve deference here. The reason is that the statutory construction at issue involves not technical details but the statute's broad purpose. While agencies are expert at the former, courts are expert at the latter.[29]
Judge Friendly discussed the issue of deference to administrative interpretations of statutes in Pittson Stevedoring Corp. v. Dellaventura, 544 F.2d 35 (2d Cir.1976), aff'd sub nom. Northeast Marine Terminal Co. v. Caputo, 432 U.S. 249, 97 S.Ct. 2348, 53 L.Ed.2d 320 (1977). At issue was whether the 1972 amendments to the Longshoremen's and Harbor Workers' Compensation Act could cover workers while engaged in stuffing and stripping containers on shore. In affirming the agency's holding of coverage, the court relied on its own statutory interpretation rather than on deference to the agency. Id. at 51-56. In declining to rely on deference to the agency, Judge Friendly noted that there are two conflicting lines of Supreme Court authority regarding deference to agencies on issues of statutory interpretation. One line "support[s] the view that great deference must be given to the decisions of an administrative agency applying a statute to the facts and that such decisions can be reversed only if without rational basis." The other line "sanction[s] free substitution of judicial for administrative judgment when the question involves the meaning of a statutory term." Id. at 49. From this second line, Judge Friendly singled out Morton v. Ruiz, 415 U.S. 199, 237, 94 S.Ct. 1055, 1075, 39 L.Ed.2d 270 (1974), in which the Supreme Court held that "In order for an agency interpretation to be granted deference, it must be consistent with the congressional purpose." Judge Friendly noted that this holding "very nearly eliminates the `deference' principle as regards statutory construction altogether since if the agency's determination is found by a court to be consistent with the congressional purpose, it presumably would be affirmed on that ground without any need for deference." 544 F.2d at 49.
In fact, even the line of Supreme Court cases supporting deference is perfectly consistent with independent judicial determination of a statute's broad purpose. One case in this line is NLRB v. Hearst Publications, Inc., 322 U.S. 111, 64 S.Ct. 851, 88 L.Ed. 1170 (1944). At issue there was whether newsboys were "employees" under the National Labor Relations Act. Without even pausing to justify doing so, the Court interpreted the purpose of the Act. The Act aimed to "bring industrial peace by substituting, so far as its power could reach, the rights of workers to self-organization and collective bargaining for the industrial strife which prevails where these rights are not effectively established." Id. at 125, 64 S.Ct. at 857. The Act tried to correct "the inability of individual workers to bargain *1090 successfully for improvements in their `wages, hours, or other working conditions' with employers who are `organized in the corporate or other forms of ownership association.'" Id. at 126, 64 S.Ct. at 858. The Court concluded that an economically inferior party, having need of the Act's protection, could be an employee for the purposes of the Act even if at common law he would be instead an independent contractor. Id. at 126-29, 64 S.Ct. at 858-59. The Court so interpreted the statute with no mention of the NLRB. Only then did the Court defer to the Board's finding, based on the details of the work situation involved, that certain newsboys were employees. The Board's discretion was allowed only within the framework of the Court's interpretation. "Determination of `where all the conditions of the relation require protection' involves inquiries for the Board charged with this duty." Id. at 130, 64 S.Ct. at 860.
Another case in this line, Gray v. Powell, 314 U.S. 402, 62 S.Ct. 326, 86 L.Ed. 301 (1941), contains a similar analysis. The Bituminous Coal Act regulated coal marketing but exempted coal consumed by the producer. Id. at 410-11, 62 S.Ct. at 331-32. At issue was the scope of this exemption. The Court first determined on its own that the Act's purpose required looking behind nominal ownership to real economic identity, and then deferred to the agency on the details of how to determine such economic identity. The Court held:
The separation of production and consumption is complete when a buyer obtains supplies from a seller totally free from buyer connection. Their identity is undoubted when the consumer extracts coal from its own land with its own employees. Between the two extremes are the innumerable variations that bring the arrangements closer to one pole or the other of the range between exemption and inclusion. To determine upon which side of the median line the particular instance falls calls for the expert, experienced judgment of those familiar with the industry.
Id. at 413, 62 S.Ct. at 333.[30]
This distinction between interpreting a statute's broad purpose on the one hand, and effecting technical classifications pursuant to that purpose on the other, finds strong support from Professor Kenneth Culp Davis. According to Professor Davis, underneath the complex rhetoric, courts in the main act as follows:

In absence of a particular statute otherwise providing, courts avoid substitution of judgment for that of the agencies on all questions except the kind of questions of law about which courts are generally better qualified than agencies ....
K. Davis, Administrative Law Treatise ¶ 29.00-1 at 520 (Supp.1982) (emphasis in original).[31] Generally, courts better than agencies can determine the broad purpose behind a statute. Courts are skilled in examining statutory language and legislative history to determine Congress' purpose. Courts are also free of a narrow view which may taint agencies. Further, technical agency expertise is of little value in ascertaining the statute's broad purpose. On the other hand, determining the best technical implementation of policy, including how to categorize borderline cases, is generally done better by agencies with technical expertise. The same point runs through most of the commentaries excerpted in W. Gellhorn, C. Byse & P. Strauss, Administrative Law  Cases and Comments 309-18 (7th ed. 1979).
In the case at bar, the basic issue discussed above has been one of broad statutory construction: what was Congress' purpose behind the IMD exclusion? By examining statutory language and legislative history, I found that Congress meant to exclude mental hospitals, meaning, at the *1091 least, facilities which provide total care to mental patients. Fine determinations of what constitutes total care are proper subjects for administrative expertise, but not the basic determination above.

VII. CONCLUSION
The IMD exclusion in 42 U.S.C. § 1396d(a) (part of the Medicare program, Title XIX of the Social Security Act) excludes only care in mental hospitals, meaning care in facilities which, at the least, provide total care to mental patients. This interpretation is based on this court's independent review of the statute's language and legislative history, without deference to HHS' contrary interpretation, even though HHS' interpretation may have been long-standing.
Accordingly, the Secretary's decision that Middletown Haven Rest Home is an IMD was based on improper factors. Specifically, the Secretary did not determine that Middletown Haven provided total care to mental patients. Accordingly, the Secretary's decision was "arbitrary, capricious, an abuse of discretion, or otherwise not in accordance with law" within the meaning of APA section 706(2)(A), 5 U.S.C. § 706(2)(A) (1976). Citizens to Preserve Overton Park v. Volpe, 401 U.S. 402, 416, 420, 91 S.Ct. 814, 823, 825, 28 L.Ed.2d 136 (1971). The Secretary's decision is accordingly reversed and remanded to HHS.
As HHS' determination has been reversed, HHS has now no claim against Connecticut based on the funds which HHS had disallowed (though a claim may arise in the future if HHS disallows the funds on proper grounds). This court trusts that HHS accordingly will assert no setoff, and will promptly restore any setoff already taken. An injunction is therefore unnecessary.
SO ORDERED.
NOTES
[1]  Until 1980, the role of HHS was played by HHS's predecessor, the Department of Health, Education and Welfare (HEW). For convenience, I refer only to HHS.
[2]  A 1980 amendment allows the state to retain disallowed advances pending judicial review, but the amendment applies only to expenditures for services furnished on or after October 1, 1980. 42 U.S.C. § 1396b(d)(5) (Supp. IV 1980).
[3]  HHS does not challenge this court's jurisdiction, but this court has an independent duty to examine whether it has jurisdiction.
[4]  The Alameda court's reasoning seems applicable to any disallowance controlled by section 1316(d). Nevertheless, the court, in finding judicial review permitted, expressly limited its holding to the situation in which the agency had already used "self-help setoff procedures" to collect the amount disallowed. 520 F.2d at 349 n. 11. The case at bar is little different, because, as mentioned, the Secretary is required to offset the amount disallowed against future quarterly payments, and presumably he has done so.
[5]  One might argue that review of the Secretary's action is controlled not by section 1316(d) but by section 1316(a), 42 U.S.C.A. § 1316(a) (West 1974 & Supp.1981), which provides for review in the court of appeals of the Secretary's disapproval of a state plan. On this question, I find persuasive the opinion of Chief Judge Lord in Minnesota v. Schweiker, No. 4-82-155 Civ., slip op. at 3-5 (D.Minn. Aug. 25, 1982). Judge Lord's case involved a disallowance very similar to the one in this case. Both disallowances were based on the agency's determination, after audit, to disallow funds previously advanced for care at an intermediate care facility (ICF) because the facility was also an institution for mental diseases (IMD). The cases were heard together by the HHS Department Grant Appeals Board, and were decided together by the Board in Decision 231. Judge Lord reviewed several cases near the boundary between sections 1316(a) and 1316(d), including the recent Third Circuit case of New Jersey v. Department of Health and Human Services, 670 F.2d 1300 (3d Cir.1982), and concluded that the disallowance in question came under section 1316(d) rather than section 1316(a) because it did "not concern the validity of Minnesota's Medicaid plan or its overall administration" but rather was "narrowly focused upon specific reimbursement claims." Slip op. at 4-5. The same reasoning applies here.
[6]  The parties have each submitted three briefs on the cross-motions for summary judgment. In order received, they are:

1. [Plaintiff's] Brief in Support of Plaintiff's Motion for Summary Judgment
2. Defendant's Memorandum in Support of Cross-Motion for Summary Judgment and in Opposition to Plaintiff's Motion for Summary Judgment
3. Plaintiff's Reply Brief
4. Defendant's Reply Memorandum in Support of Motion for Summary Judgment
5. [Defendant's] Supplemental Brief in Support of Defendant's Cross-Motion for Summary Judgment
6. Plaintiff's Response to Defendants' Supplemental Brief.
The court will refer to these briefs respectively as:
1. Plaintiff's Brief
2. Defendant's Brief
3. Plaintiff's Reply Brief
4. Defendant's Reply Brief
5. Defendant's Supplemental Brief
6. Plaintiff's Supplemental Brief.
The Supplemental Briefs discuss Minnesota v. Schweiker, No. 4-82-155 Civ. (D.Minn. Aug. 25, 1982), which was decided after this court heard oral argument on the summary judgment motions.
[7]  HHS regulations define an IMD as

an institution that is primarily engaged in providing diagnosis, treatment or care of persons with mental diseases, including medical attention, nursing care and related services. Whether an institution is an institution for mental diseases is determined by its overall character as that of a facility established and maintained primarily for the care and treatment of individuals with mental diseases, whether or not it is licensed as such ....
42 C.F.R. § 435.1009 (1980) (emphasis added). In turn, the regulations define an "institution" as
an establishment that furnishes (in single or multiple facilities) food, shelter, and some treatment or services to four or more persons unrelated to the proprietor.
Id.
[8]  I thus disagree with Chief Judge Lord in Minnesota v. Schweiker, No. 4-82-155 Civ., slip op. at 15 (D.Minn. Aug. 25, 1982), who concluded in a case very similar to the case at bar, see supra note 5, that "by `institution for mental diseases' the Congress intended to refer to those institutions which provided primarily long-term care for the mentally ill by administering psychiatric treatment for its residents on the premises." I disagree because, as discussed below, the legislative history indicates on balance that long-term care and psychiatric care are not necessary for a facility to be an IMD, but that total care is. Though I disagree with Judge Lord's conclusion, I have greatly benefited from his insightful opinion.
[9]  By "total care" I mean the very high level of care given, for example, to a hospital inpatient or a nursing home resident. The patient is totally dependent on the institution and is submerged in it.
[10]  Section 1396a(21) speaks of "community mental health centers, nursing facilities, and other alternatives to care in public institutions for mental diseases." Section 1396a(20) discusses "alternate plans of care" to care in (public or private) "institutions for mental diseases," but it mentions no examples.

HHS suggests that the term "public institution for mental diseases" may have a more restrictive meaning than simply a public "institution for mental diseases." See Defendant's Brief at 10 n. 6. This idea is plausible, and if correct it could invalidate inferences from the meaning of "public institution for mental diseases" to the meaning of "institution for mental diseases." However, this idea is counterintuitive, and HHS does not support it.
[11]  I will refer to these acts as, e.g., "the 1950 Act." The full citations for these seven acts, with their relevant provision summarized in parentheses, are:

1950: Social Security Act Amendments of 1950, Pub.L. No. 81-734, 64 Stat. 477, 549 (sec. 303, § 6, IMD exclusion for Title I).
1960: Social Security Amendments of 1960, Pub.L. No. 86-778, 74 Stat. 924, 991 (sec. 601, amending Title I IMD exclusion).
1963: Community Mental Health Centers Act of 1963, Title II of Pub.L. No. 88-164, 77 Stat. 282, 290-94 (funding construction of community mental health centers).
1965: Social Security Amendments of 1965, Pub.L. No. 89-97, 79 Stat. 286, 343-52 (sec. 121, enacted Title XIX, with IMD exclusion for those under age 65).
1967: Social Security Amendments of 1967, Pub.L. No. 90-248, 81 Stat. 821, 920 (sec. 250(a), § 1121, ICF coverage under Title XI). 1971: Pub.L. No. 92-223, 85 Stat. 802, 809 (sec. 4, § 1905, ICF coverage under Title XIX).
1972: Social Security Act Amendments of 1972, Pub.L. No. 92-603, 86 Stat. 1329, 1459-60 (sec. 295, clarifying coverage of ICF care in IMDs for those over 65).
Of these seven acts, the 1950, 1960 and 1967 Acts concern other Social Security titles; the 1963 Act does not concern Social Security; and the 1965, 1971 and 1972 Acts concern Social Security Title XIX.
[12]  In the same sentence, the 1950 Act also excluded any individual "who has been diagnosed as having tuberculosis or psychosis and is a patient in a medical institution as a result thereof." Benefits for such patients for up to 42 days were granted in 1960. 1960 Act, sec. 601(f), 74 Stat. at 991.
[13]  Why did Congress single out the aged to receive IMD benefits? Apparently for two reasons. First, Congress had excluded IMDs in part because of the long-term care involved. But with the progress made in care for the mentally ill, care for the aged mentally ill was no longer much longer-term on the average than other care for the aged. Second, the line for old persons between mental illness and senility was hard to draw. Thus, an IMD exclusion would have posed a tough classification problem, and would also have discouraged appropriate patient transfer from one kind of facility to another. See Statement of Sen. Carlson, 110 Cong.Rec. 21349 (1964) (by implication).

HHS argues that Congress removed the IMD exclusion for those 65 and over in order to fund alternatives to mental hospitals in treating the aged mentally ill. Thus, HHS concludes, Congress considered such alternative treatments as coming within the IMD exclusion. HHS points to the Senate Finance Committee report, Defendant's Brief at 15-16; however, the report does not support HHS' position. First, the report notes the increased treatment success, in mental hospitals and elsewhere, as a reason for considering mental illness on a par with physical illness. S.Rep. No. 404, Part I, 89th Cong., 1st Sess. 144, reprinted in 1965 U.S.Code Cong. & Ad.News 1943, 2084. Next, the report notes Congress' policy of encouraging alternative care, and explains that, as a condition to receiving funds for care for aged persons in IMDs, states are required to develop plans for use, when appropriate, of alternative care. Id. at 145, 1965 U.S.Code Cong. & Ad.News at 2085. Far from indicating that alternative care was before 1965 subject to the IMD exclusion, the report consistently contrasts "hospital," "institution," "institutional treatment," and "institutions for mental disease" on the one hand with alternative care on the other. Id. at 144-47, 1965 U.S.Code Cong. & Ad.News at 2084-87.
[14]  The House version substituted "generally" for "traditionally."

In the quoted passage, the committees were describing the reasons for the IMD exclusion before 1965. However, in each case the committee was considering the 1965 IMD exclusion in the same light.
[15]  In contrast, state funding of alternatives to mental hospitals was most inadequate. In the early 1960's, alternatives to state mental hospitals were badly needed and not present in large quantity. H.R.Rep. No. 694, 88th Cong., 1st Sess., reprinted in 1963 U.S.Code Cong. & Ad. News 1054, 1064-65. Congress envisioned alternative care to come from "comprehensive community mental health centers" which would include "an emergency psychiatric unit, inpatient services, outpatient services, day and night care, foster home care, rehabilitation programs, and general diagnostic and evaluation services." Id., 1963 U.S.Code Cong. & Ad. News at 1065. Such centers would "transfer the care of the mentally ill from State custodial institutions to community facilities and services comparable to the facilities and services provided at the community level for those who are physically ill." Id., 1963 U.S.Code Cong. & Ad.News at 1058. In 1965, Congress still noted a strong need to provide more of such alternative care. S.Rep. No. 404, Part I., 89th Cong., 1st Sess. 145-47, reprinted in 1965 U.S.Code Cong. & Ad.News at 1943, 2085-86; H.R.Rep. No. 213, 89th Cong., 1st Sess. at 127-29 (1965). (Though in 1965 Congress was concerned specifically with the need for alternative care for aged mental patients, the committee reports fairly imply that Congress saw a need for more alternative care for mental patients in general.) Congress accordingly made the states adopt plans for alternative care of mental patients as a condition of funding for care to the aged in IMDs. 1965 Act, sec. 121, § 1902(a)(20), 79 Stat. at 347 (codified as amended at 42 U.S.C. § 1396a(a)(20) (1976)); Statement of Sen. Long, 110 Cong.Rec. 21348 (1964). Therefore, Congress in 1965 had good reason to limit the IMD exclusion to "mental hospitals."
[16]  Senator Ribicoff was a leading sponsor of the 1965 legislation, and a former HEW Secretary. Plaintiff's Brief at 13-14.
[17]  The phrase "total care" is defined in note 9 supra.
[18]  Congress had previously enacted ICF coverage for care for the aged, blind, and disabled under Title XI in 1967. 1967 Act, sec. 250(a), § 1121, 81 Stat. at 920.
[19]  Similar statements accompanied earlier proposals to include ICF coverage under Medicaid. Senate Comm. on Finance, 92d Cong., 1st Sess., Material Related to H.R. 1  Medicare and Medicaid Amendments 48 (Comm.Print 1971); Statement of Sen. Long, 116 Cong.Rec. 41798, 41804 (1970).

As well as indicating that by "mental hospital" Congress meant a total care institution, this legislative history from 1970-1971 suggests on its own that an "IMD" cannot be defined, as HHS urges, as an institution primarily for mental patients. Indeed, since Congress intended ICF coverage for patients who otherwise "would require placement in a ... mental hospital," it is unlikely then that Congress intended to exclude coverage in a facility which existed "primarily" for such persons.
[20]  As just explained, a "mental hospital" need not provide long-term care, and it need not provide any particular level of psychiatric care; but it must provide total patient care. There may be further restrictions on what a "mental hospital" can be. A facility may need to have "enough" mental patients, in some sense, in order to be a "mental hospital." Further, it is possible that facilities with certain organizational structures cannot be IMDs. See, e.g., infra pp. 1087-1088 ("community mental health centers" are not IMDs). For the case at bar, it is not necessary to determine what restrictions there are on an IMD, beyond that it provide total care.
[21]  The statute expressly allows that one facility may be both an ICF and a hospital. "The term `intermediate care facility' also includes any skilled nursing facility or hospital which meets [various requirements of quality and patient protection]." 42 U.S.C. § 1396d(c) (Supp. IV 1980).
[22]  HHS cites H.R.Rep. No. 231, 92d Cong., 2d Sess., reprinted in 1972 U.S.Code Cong. & Ad. News at 4989, 5097-98, for the proposition that "ICF care" cannot refer to care within a nursing home, and thus by analogy cannot refer to care within an IMD. Defendant's Brief at 13. However, the report cited simply warns against substandard nursing homes being passed off as ICFs, and notes that ICFs are not for patients who need full nursing care. The report nowhere implies that one facility may not give both ICF and nursing home care. In fact, Congress explicitly contemplated such an arrangement, Statement of Sen. Bellmon, 117 Cong. Rec. 44721 (1971), and the statute itself contemplates such an arrangement, supra note 21.
[23]  HHS argues that, if an IMD were a mental hospital, then the term "hospital" would be superfluous, and Congress would instead have referred to "simply `all services, including SNF and ICF services, provided in an IMD.'" Defendant's Brief at 12. However, the wording which Congress chose seems, if anything, simpler than HHS' proposed wording. Congress' wording also reads more easily because it better tracks the rest of the statute.
[24]  Indeed, the 1963 Act's program for community mental health centers was still very much on Congress' mind as it considered the 1965 Act. In fact, Congress saw sections 1396a(a)(20)-(21) as helping to carry out the 1963 Act's program. S.Rep. No. 404, Part I, 89th Cong., 1st Sess. 146, reprinted in 1965 U.S.Code Cong. & Ad.News 1943, 2086 (stressing need for states to move ahead with comprehensive mental health plans as contemplated in the 1963 Act).
[25]  Further, the legislative history of the 1965 Act itself supports the view that community health centers were an alternative to public and private institutions for mental disease. The Senate committee report mentioned community mental health centers as an alternative to "mental hospitals," S.Rep. No. 404, Part I, 89th Cong., 1st Sess. 146, reprinted in 1965 U.S. Code Cong. & Ad.News 1943, 2086, which in turn the committee was using as a synonym for "institutions for mental diseases," see id. at 144-47, 1965 U.S.Code Cong. & Ad.News at 2084-87.
[26]  If a community mental health center did offer some services in a mental hospital setting, those services would, notwithstanding section 1396a(a)(21), be excluded from coverage as occurring in an IMD. However, other services offered by the community mental health center need not be therefore tainted. Section 1396d(a)(15), which provides coverage for "intermediate care facility services (other than such services in an institution for mental diseases)," might still cover ICF services given by the community mental health center if they were given in a physically separate facility. Cf. § 1396d(c) (considering the character of a "distinct part" of an institution).
[27]  See supra note 20.
[28]  HHS cites Schweiker v. Gray Panthers, 453 U.S. 34, 44, 101 S.Ct. 2633, 2640, 69 L.Ed.2d 460 (1981). In that case, Congress had "explicitly delegated to the Secretary broad authority to promulgate regulations defining eligibility requirements for Medicaid." Id. at 43, 101 S.Ct. at 2640. No such explicit delegation exists in the case at bar.
[29]  HHS also argues that Congress, by amending the Medicaid provisions without further defining "IMD," silently approved HHS' definition. Defendant's Reply Brief at 5-6. This argument depends not on deference to HHS but on inferring Congress' intent from silence. The force of this argument depends on what HHS did (see, e.g., Defendant's Brief at 19, arguing that regulations supporting HHS' position have been in effect since 1966) and how Congress reacted (see, e.g., supra note 19, implying that Congress in 1971 did not approve HHS' position). In any event, this argument, being merely one based on silence, would not overcome the clear indications discussed above that Congress had a different definition in mind.
[30]  NLRB v. Hearst and Gray v. Powell are analyzed in this way in Nathanson, Administrative Discretion in the Interpretation of Statutes, 3 Vand.L.Rev. 470, 472-75 (1950).
[31]  Professor Davis is discussing "Scope of Review of Informal Action Including Rulemaking." The vast bulk of agency action, including the regulations at issue here, is "informal" as that word is technically used.
