The State of Illinois, by the Illinois Department of Public Aid, filed this suit after denial of its request for federal funds pursuant to Title XX of the Social Security Act, Social Services Amendments of 1974, Pub.L. No. 93-647, 88 Stat. 2337 (1975). Illinois appeals from the entry of summary judgment in favor of the defendants (referred to collectively as the Secretary). For the following reasons, we affirm the judgment of the district court.
I
BACKGROUND
A. Facts
From at least 1978 through 1981, Illinois operated four “juvenile residential centers” (JRCs).1 These facilities were under the control of the Juvenile Division of the Illinois Department of Corrections. The JRCs housed youths sentenced by the juvenile court and provided various educational and vocational opportunities. The four centers served separate regions of Illinois, ranging from the Cook County metropolitan area to a forty-one county area in the central part of Illinois.
B. Title XX
For the period in question, Title XX of the Social Security Act authorized federal financial participation (FFP) to reimburse states for costs incurred in providing specified social services. See Pub.L. No. 93-647, § 2, 88 Stat. 2337, 2337-38 (1975) (adding §§ 2001-2002(a)(l) to the Social Security Act). With exceptions not relevant here, FFP was not available for services provided in prisons. Id. § 2, 88 Stat. at 2342 (adding § 2002(a)(ll)). However, the regulations governing Title XX expressly excluded “separate juvenile correctional facilities” and “community-based residential service facilities, such as half-way houses” from the definition of “prison,” 45 C.F.R. § 228.44(c)(1).2 1
A separate juvenile correctional facility is defined by the regulation as “one that is located in a separate building or buildings; is served by separate day-to-day operational staff; and provides a separate and distinct program of services.” Id. *430§ 228.44(c)(2). Community-based residential service facilities are not defined separately. Under these regulations, FFP generally was available for expenditures incurred by separate juvenile correctional facilities; the regulations provided, however, that such funds were not authorized for “inherent responsibilities of the facility (e.g., food, clothing, shelter, and managing and carrying out the detention function).” Id. § 228.44(d); see also Pub.L. No. 93-647, § 2, 88 Stat. at 2341 (adding § 2002(a)(7)(E)). No such prohibition existed with respect to community-based residential service facilities.
C. Administrative Proceedings
1.
During the period from July 1, 1978 through June 30, 1981, Illinois requested FFP in the amount of $6,570,501 for certain expenditures made in connection with the JRCs. Illinois did not specify which expenditures represented the provision of social services, but rather claimed all costs associated with the JRCs on the assumption that the centers were community-based residential service facilities within the meaning of 45 C.F.R. § 228.44(c)(1).
Contrary to Illinois’ characterization of the JRCs, the Office of Human Development Services of the Department of Health and Human Services (OHDS) determined that the centers were not community-based residential service facilities. Instead, OHDS concluded that the JRCs met the regulatory definition of separate juvenile correctional facilities, and thus disallowed the claim to the extent it represented costs of inherent state functions for food, clothing, shelter, and carrying out the detention function.
2.
The Departmental Grant Appeals Board (the Board) sustained OHDS’ decision. Illinois Dep’t of Public Aid, No. 85-15 at 8 (Health and Human Services Departmental Grant Appeals Board Decision No. 733 Mar. 26, 1986) [hereinafter Board Decision]. The Board reasoned that the JRCs were facilities for “the confinement of juveniles who ... were serving their sentences for actions which, if committed by an adult, would have been the basis for a criminal conviction.” Id. Confinement was at least a “significant purpose of the JRCs,” even if not necessarily their “primary purpose.” Id. at 9. The Board discounted Illinois’ contention that “rehabilitation and reintegration” were more important goals of the JRCs than detention; these goals, it noted, were shared by other facilities that Illinois acknowledged to be correctional facilities. Id. at 13. Moreover, the Board interpreted the job descriptions of key JRC staff members as “emphasizing] the security function” of the employees. Id. at 9 (emphasis in original).
Although the Board acknowledged that the regulations provided no precise definition of community-based residential service facilities, it pointed to language in the statute’s legislative history contrasting “ ‘community-based care which approximates a home environment’ ” with “ ‘institutional care.’ ” Id. at 10 (quoting S.Rep. No. 1356, 93d Cong., 2d Sess. 6 (1974)). The Board held that Illinois had provided “no evidence ... that the environment at the JRCs was closer to a home environment than to an institutional environment.” Id. at 11. Moreover, the Board reasoned that institutions serving “an entire fourth of a state the size of Illinois” could not be considered community based. Id.
Finally, the Board rejected Illinois’ contention that HHS had approved total funding of the JRCs when it approved certain service categories in a series of required Comprehensive Annual Services Plans (CASPs) submitted by Illinois. Id. at 17. The Board noted that at least one of the CASP descriptions referred to “[placement in a group home milieu.” Id. at 16; see Administrative Record (A.R.) at 73. The Board concluded, however, that “the State’s own literature indicates that the State did not consider JRCs to be ‘group homes.’ ” Board Decision at 16.
During the administrative proceedings, Illinois produced memoranda written by employees of the Department of Health and Human Services (HHS) to show that *431some HHS employees considered the JRCs and similar facilities to be community-based residential service facilities. OHDS' motion to strike the material was granted.
D. District Court Proceedings
Illinois sought judicial review of the dis-allowance in district court.3 The district court held that the Board's decision was "neither arbitrary, capricious, nor contrary to federal law." Mem. op. at 4. Accordingly, the court entered summary judgment in favor of the Secretary. Id. The court did not comment on Illinois' contention regarding the admissibility of the BITS memoran-da.
II
ANALYSIS
A. The Administrative Decision
The basic question before us is whether the Secretary appropriately determined that the JRCs were to be classified as separate juvenile correctional facilities rather than as community-based residential service facilities. The Administrative Procedure Act authorizes federal courts to
hold unlawful and set aside agency action, findings, and conclusions found to be-
(A) arbitrary, capricious, an abuse of discretion, or otherwise not in accordance with law;
(B) contrary to constitutional right, power, privilege, or immunity;
(C) in excess of statutory jurisdiction, authority, or limitations, or short of statutory right;
(D) without observance of procedure required by law; [or]
(E) unsupported by substantial evidence. 5 U.S.C. § 706(2); see Adventist Living Centers v. Bowen, 881 F.2d 1417, 1420 (7th cir.1989); Bedford Medical Center v. Heckler, 766 F.2d 321, 323 (7th Cir.1985).
The essential task of a reviewing court is to discern the will of congress and to apply it to the particular facts of the case. We must first determine "whether congress has directly spoken to the precise question at issue. If the intent of congress is clear, that is the end of the matter; for the court, as well as the agency, must give effect to the unambiguously expressed intent of congress." Chevron U.S.A. v. Natural Resources Defense Council, 467 U.S. 837, 842-43, 104 S.Ct. 2778, 2781, 81 L.Ed.2d 694 (1984). However, if the administering agency fills a gap in the statute, the court must determine "whether the agency's answer is based on a permissible construction of the statute." Id. at 843, 104 S.Ct. at 2782; see also Fort Stewart Schools v. Federal Labor Relations Auth., - U.S. -, 110 S.Ct. 2043, 2046, 109 L.Ed.2d 659 (1990).
1.
In this case, the language of the statute leaves the intent of congress ambiguous. Although Congress clearly limited the availability of FFP for services provided in prisons, see Pub.L. No. 93-647, § 2, 88 Stat. 2337, 2342 (1975) (adding § 2002(a)(11)), it did not address specifically what constituted a prison. By regulation, HHS provided that prisons included neither separate juvenile correctional facilities nor community-based residential service facilities. 45 C.F.R. § 228.44(c)(1).
Neither party contests illS' decision to carve both separate juvenile correctional facilities and community-based residential service facilities out of the "prison exclusion" for FFP. At issue here is the *432further regulatory distinction in the treatment of separate juvenile correctional facilities and community-based residential service facilities concerning the availability of FFP. As we have already noted, the regulations provide that, in the case of a separate juvenile correctional facility, “FFP is not available for inherent responsibilities of the facility (e.g., food, clothing, shelter, and managing and carrying out the detention function).” Id. § 228.44(d). No similar prohibition applies to community-based residential service facilities. The Board admitted that the distinction between separate juvenile correctional facilities and community-based residential service facilities in the HHS regulations is not a “model[] of clarity." Board Decision at 8. We agree. Nevertheless, we cannot say that, in distinguishing between separate juvenile correctional facilities and community-based residential service facilities with respect to the distribution of FFP, the regulations embody an impermissible construction of Title XX. See Chevron, 467 U.S. at 843, 104 S.Ct. at 2781-82. As the Board pointed out, in drafting the regulation, HHS was arguably more concerned with indicating what was not a prison than with carefully distinguishing between separate juvenile correctional facilities and community-based residential service facilities. See Board Decision at 9. Moreover, the Secretary’s distinction between separate juvenile correctional facilities and community-based residential service facilities is grounded reasonably in Congress’ manifest concern that federal funds not be used to replace existing fiscal commitments by state governments. This congressional concern is, as the Secretary points out, evident in the statutory language4 and in the legislative history.5 Indeed, this court has recognized in an earlier decision this congressional intent:
“When Congress passed Title XX it clearly intended to supplement, rather than to replace, state funding of social services. Act § 1397b required states receiving Title XX funds to continue funding social services at prior levels. Title XX was structured to allow states to extend their services further than before, and Act § 1397a reads like a congressional judgment that its supplemental resources were better spent on services in nonexistent or limited state supply than on services already generally available.”
Illinois v. Bowen, 808 F.2d 571, 574 (7th Cir.1986) (quoting Illinois v. Heckler, 616 F.Supp. 620, 624 (N.D.Ill.1985)).
Most states maintain a broad spectrum of institutions and programs for juvenile offenders. All have, to some degree, the purpose of placing restrictions on the liberty of the juvenile; all have, to some degree, the purpose of reintegrating the juvenile into the community. It was the duty of the Secretary to ensure that the federal funds were spent for community-oriented social services not associated with the state’s responsibility to house, feed, and guard those committed to its custody for the violation of the criminal law. The Secretary’s regulation is a principled attempt to make the *433distinction required by the congressional mandate.
2.
We next turn to the question of whether the Secretary correctly applied Title XX and its implementing regulations to the facts of this case. A reviewing court will not reverse an FFP disallowance if the decision of the Secretary is supported by substantial evidence. See Illinois v. Bowen, 808 F.2d 571, 578 (7th Cir.1986). Moreover, “interpretations of regulations issued pursuant to a statute ... are entitled to considerable deference.” Bedford Medical Center v. Heckler, 766 F.2d 321, 323 (7th Cir.1985).
Given this standard, we believe that the district court correctly granted summary judgment to the Secretary. The record quite clearly establishes that the JRCs fall in a gray area that cannot be characterized as a prison or as a community-based institution providing social services. We cannot say that, on the basis of this record, the Board erred in its conclusion that the JRCs were oriented more toward custodial and security functions than the provision of social services.6 Nor can we say that the record fails to support the determination that the “regional” nature of the JRCs did not comport with the usual understanding of the term “community.” Board Decision at 11. Similarly, evidence in the administrative record7 adequately supports the Board’s conclusion that the JRCs were not sufficiently similar to group homes or half-way houses to qualify as community-based residential service facilities. Id. Group and foster homes are mentioned as alternatives to placement in JRCs in Illinois’ literature. See A.R. at 125, 130, 214.
B. Illinois’ Pennhurst Argument
We also cannot accept Illinois’ contention that the Secretary impermissibly “employ[ed] a post hoc interpretation of the regulation.” Appellant's Br. at 9. Illinois asserts that the Secretary’s decision imposes on it a significantly increased financial obligation; it contends that “Congress’ power to legislate under the spending power ... does not include surprising participating States with post-acceptance or ‘retroactive’ conditions.” Pennhurst State School & Hosp. v. Halderman, 451 U.S. 1, 25, 101 S.Ct. 1531, 1544, 67 L.Ed.2d 694 (1981); see Appellant’s Br. at 10.
Illinois’ reliance on Pennhurst is misplaced. As this court has noted, “The case before us, [unlike Pennhursf], involves not whether enforceable obligations were created ... but rather the scope and interpretation of those obligations.” American Hosp. Ass’n v. Schweiker, 721 F.2d 170, 183 (7th Cir.1983) (citations omitted) (em*434phasis in original), cert. denied, 466 U.S. 958, 104 S.Ct. 2169, 80 L.Ed.2d 553 (1984). Moreover, the Court in Pennhurst emphasized that it was wary of “imposing] affirmative obligations on the States to fund certain services.” Pennhurst, 451 U.S. at 16-17, 101 S.Ct. at 1539 (emphasis in original). The regulations in question in this case, however, imposed no new, affirmative obligations on Illinois.8 The FFP claimed here was for operating and similar costs that “were traditionally a responsibility of the State.” Board Decision at 7. Although the JRCs were relatively new facilities, having evolved from a demonstration project in the mid-1970s, this project was funded by the Illinois Law Enforcement Commission. See A.R. at 589. In no sense, therefore, did the federal government impose any affirmative obligations on Illinois. These costs were inherent to the facility and previously paid by Illinois. See Board Decision at 7 n. 3. The Secretary’s decision to deny total reimbursement for these inherent costs—while leaving Illinois the option to seek reimbursement for social services—was consistent with the statute’s maintenance of effort provision, its legislative history, and its implementing regulations.
The Board concluded that, given the nature of the JRCs and the existence of limits on FFP for separate juvenile correctional facilities, “the State at the very least had a duty to inquire whether it could reasonably consider them to be excluded from the prohibition.” Id. at 10. Illinois, on the other hand, contends that it sought and obtained the necessary approval by submitting its CASPs. The Board acknowledged that the CASPs in question may have been sufficiently detailed to meet Title XX regulations, but reasoned that there was no “basis for expanding the service category beyond what was specified in the CASPs: that placement would be in group homes or foster homes.” Id. at 16 n. 8.
The Board’s resolution is correct. Moreover, like the Board, we do not find determinative that Illinois had appended a list of the facilities to one of its CASPs. See id. at 12 n. 5. As the Board noted:
[T]he Illinois Youth Centers—which the State acknowledged were [separate juvenile correctional facilities]—appear under the same heading[ as the JRCs]. Even if the JRCs were listed separately, however, this would not show that OHDS knew the State maintained that JRCs were community-based residential service facilities. Moreover, OHDS has not denied that FFP is available for social services provided to JRC residents—the issue is whether FFP is available for “inherent responsibilities” of the facilities.
Id.
C. The Internal Memoranda
Finally, we need not review the Board’s decision to strike from the record the mem-oranda that reflected the views of lower-level personnel regarding the proper classification of the JRCs and similar facilities. Our review requires us to determine the permissibility of the Secretary’s decision, not to determine whether the views of lower-level personnel might be more reasonable. See Homemakers N. Shore, Inc. v. Bowen, 832 F.2d 408, 413 (7th Cir.1987) (“ ‘The Secretary’s position’ is the position of the Department as an entity, and the fact that people in the chain of command have expressed divergent views does not diminish the effect of the agency’s resolution of those disputes. An inconsistent administrative position means flip-flops by the agency over time, rather than reversals within the bureaucratic pyramid.”) (citations omitted); Illinois v. Heckler, 616 F.Supp. 620, 628 n. 14 (N.D.Ill.1985), aff'd on other grounds, 808 F.2d 571 (7th Cir.1986); see also New York State Dep’t of Social Servs. v. Bowen, 835 F.2d 360, 366 (D.C.Cir.1987), cert. denied, 486 U.S. 1055, *435108 S.Ct. 2820, 100 L.Ed.2d 922 (1988). Moreover, the most directly relevant of the three memoranda acknowledged that classification of the Illinois J'RCs as either separate juvenile correctional facilities or community-based residential service facilities “would be equally supportable.” A.R. at 55.
In summary, the regulations at issue were based on a permissible construction of Title XX and the Secretary made a principled application of these regulations. Under Chevron and its progeny, we may require no more. Therefore, we must affirm the judgment of the district court.
Conclusion
For the foregoing reasons, the judgment of the district court is affirmed.
AFFIRMED.
. Three of the four facilities were closed by June 30, 1981. The fourth was restructured into what concededly is a correctional institution not eligible for the full reimbursement that Illinois claims.
. This regulation has been amended several times, but has not been altered in relevant part since it first appeared at 45 C.F.R. § 228.44; it subsequently was recodified at 45 C.F.R. § 1396.44. For consistency’s sake, we shall cite to section 228.44.
. On August 27, 1987, the Secretary moved to dismiss or, in the alternative, to transfer the complaint to the United States Claims Court. The Secretary contended that the Claims Court had exclusive jurisdiction over the claim because Illinois was seeking monetary relief against the federal government in excess of $ 10,-000. However, in Bowen v. Massachusetts, 487 U.S. 879, 108 S.Ct. 2722, 101 L.Ed.2d 749 (1988), the Supreme Court held that district courts have jurisdiction to review agency action disallowing federal reimbursement to states under Title XIX of the Social Security Act (Medicaid). Recog. nizing that the decision in Bowen v. Massachusetts would apply to jurisdiction over this Title XX claim as well, the Secretary moved to withdraw his motion. The district court granted the motion to withdraw on July 21, 1988.
. The express language of section 2003(b) states:
Each state which participates in the program established by this title shall assure that the aggregate expenditures from appropriated funds from the State and political subdivisions thereof for the provision of services during each services program year ... with respect to which payment is made under section 2002 is not less than the aggregate expenditures from such appropriated funds for the provision of those services during the fiscal year ending June 30, 1973 [or 1974 where payments were made under certain other titles if the aggregate appropriated state funds were less]....
Pub.L. No. 93-647, § 2, 88 Stat. 2337, 2342 (1975).
. Perhaps the clearest expression of that intent is found in the legislative history on the Senate version of Title XX:
The bill includes a requirement that any increase in Federal social services funding in a State be used for an actual increase in services provided rather than to simply replace State funds now being spent on services.
S.Rep. No. 1356, 93d Cong., 2d Sess. 2 (1974). While the final bill agreed upon at Conference did not include the Senate language, it did include — and the Conference Report specifically approves — the "maintenance of effort” language of the House bill. See H.R.Conf.Rep. No. 1643, 93d Cong., 2d Sess. 30 (1974), U.S.Code Cong. & Admin.News 1974, p. 8133.
. Illinois contends that the Secretary found that the JRCs could not be community-based residential service facilities because he impermissi-bly concluded that such facilities "must be outside of the State’s correctional system.” Appellant's Br. at 15. However, this characterization of the Secretary’s position is inaccurate. The Board acknowledged that it ”agree[d] with the State that the fact that the JRCs were run by [the Illinois Department of Corrections] is not determinative.” Board Decision at 10. The Board's position, which is supported by substantial evidence, is that Illinois did not carry its burden of showing that these particular Illinois Department of Corrections facilities should be classified as community-based residential service facilities. See id.
. OHDS rejected Illinois' contention that "a JRC is more like a half-way house than a juvenile correctional facility.” A.R. at 5. OHDS noted that
a half-way house established for the Illinois Department of Corrections (IDOC) is a residence for persons on parole or mandatory supervised release. The JRCs do not meet this definition. The youths located at the JRCs were not paroled or under mandatory supervised release but rather were committed to IDOC as a result of an alternative disposi-tional court order emanating from an offense committed which, if committed by an adult, would have been punishable by imprisonment.
Id. at 5-6 (citing IlI.Rev.Stat. ch. 38, para. 1003-14-4). Illinois correctly observes that the regulatory definition of community-based residential service facilities refers to "'half-way house[s]’ ... merely [as] an illustration.” Appellant’s Br. at 8. Nonetheless, OHDS reasonably could note the fact that the JRCs did not meet Illinois’ own definition of a half-way house in deciding that the JRCs were not properly classified as community-based residential service facilities.
. Cf. Illinois v. Heckler, 616 F.Supp. 620, 626 n. 12 (N.D.Ill.1985) (rejecting similar argument based on Pennhurst in case involving interpretation of other provisions of Title XX: Illinois was not "sandbagged ... into adopting or expanding its programs on any legitimate misunderstanding it could get [complete] federal reimbursement"), aff'd, 808 F.2d 571, 573 n. 5 (7th Cir.1986).