WIGGINS, Circuit Judge:
The Secretary of Health and Human Services appeals from an injunction issued by the district court. The plaintiffs brought a class action challenging the Secretary’s procedure for computing attorneys’ fees in Social Security cases. The plaintiffs moved for partial summary judgment and an injunction. The district court granted the motions for partial summary judgment and an injunction in part and denied them in part. The court held that the Secretary’s application of 42 U.S.C. § 406 “artificially reduced” attorneys’ fees awarded to attorneys representing claimants before the Agency and in court. The court found that the Secretary’s construction of the statute was “manifestly contrary to [the] statute” and not entitled to deference. The court ordered the Secretary to calculate and withhold attorneys’ fees by a different formula and directed that the Secretary implement the order within fifteen days. We reverse.
[764]*764FACTS
Title II (SSDI) of the Social Security Act, 42 U.S.C. §§ 401-33, provides disability benefits to claimants who demonstrate physical or mental disability within the meaning of the Act. To receive Title II benefits, the claimant must be totally disabled and currently insured. To be “currently insured”, the claimant must have worked and contributed to the Social Security trust fund. Eligibility for Title II benefits is independent of the claimant’s financial need. Financial need is presumed. Title XVI (SSI), 42 U.S.C. §§ 1381-83, of the Social Security Act provides supplemental income payments for the aged, blind and disabled. Eligibility for Title XVI benefits, however, is based on economic need. The more “chargeable” income a claimant has, the less Title XVI benefits he will receive. 42 U.S.C. § 1382(a)(2)(B). Title II benefits are considered “chargeable” income for Title XVI purposes. That is, the amount a claimant is eligible to receive under Title XVI is reduced by the amount he has received under Title II. 42 U.S.C. § 1382a(a)(2)(B).
When a claimant files a claim for benefits under Title II, the administrative deci-sionmaking process is often protracted. In such a case, the claimant, once eligibility has been determined, is entitled to a retroactive award of benefits. Many claimants apply for Title II and Title XVI benefits concurrently. Prior to 1980, if the claimant received Title XVI benefits first and later received a retroactive award of Title II benefits for the same period, he would have received a “windfall.” The “windfall” was created because if Title II benefits had been received in the months that they were due, because they are “chargeable” income for Title XVI purposes, they would have reduced the amount of Title XVI benefits payable to the claimant. However, because the Title II benefits were not received in the months in which Title XVI benefits were paid, the Title XVI benefits would never have been reduced by the amount of the Title II benefits.
In order to remedy the “windfall” problem, Congress enacted in 1980 a “windfall offset” provision. 42 U.S.C. § 1320a-6.1 The statute mandates that when a claimant is awarded benefits under either section and later receives a retroactive award of benefits under the other, the retroactive award will be reduced by the amount received under the other title. This offset creates the attorneys’ fees problem at issue in this case.
Title II provides for payment of attorneys’ fees. Under 42 U.S.C. § 406, attorneys’ fees may be awarded by the Secretary 2 or by the district court3 to an attor[765]*765ney representing a The fees are withheld from the benefits awarded to the claimant. Title XVI contains no analogous provision for attorneys’ fees. The interplay between section 406 and the “windfall offset” provision provides the basis for the plaintiff attorneys’ suit.
A particular attorney’s fee is calculated both by the court and by the Secretary as a percentage of the past-due benefits. If the retroactive Title II benefits awarded to the claimant are reduced by the prior award of Title XVI benefits, the attorney’s fee will be much smaller. This is so because, by regulation, the Secretary defines “past-due” benefits as the “total amount of benefits payable under Title II of the Act....” 20 C.F.R. § 404.1703 (1988) (emphasis added). The amount “payable” is that “amount of retroactive [Title II benefits] reduced by the amount of any [Title XVI] benefits received in the retroactive period.” 20 C.F.R. § 404.408(b) (1982) (Preamble: final regulations implementing 42 U.S.C. § 1320a-6) (47 Fed.Reg. 4986 (Feb. 1982)). Thus, the Secretary defines “past-due benefits” to mean net, post-offset Title II benefits. The district court provided the following example of the reduction in attorneys’ fees accomplished by the Secretary’s interpretation of the windfall offset provision:
[A]ssume a claimant is entitled to $10,-000 in Title II benefits and $9,000 in Title XVI benefits, each entitlement calculated independently of the other. If Title II benefits are paid first, the court can authorize up to $2,500 (25% of $10,000) in attorneys’ fees under § 406(b) and the Secretary can withhold and pay directly to the attorney up to $2500 under either § 406(a) or (b). However, assume the $9,000 in Title XVI benefits are paid first. Under § 1320a-6, the $10,000 Title II entitlement must be offset by the $9,000 Title XVI award, leaving only $1,000 in Title II benefits. The result is that the court could authorize only $250 in attorneys’ fees under § 406(b) and the Secretary could withhold and pay directly to the attorney only $250 under either subsection (a) or (b).
Guadamuz v. Heckler, 662 F.Supp. 1060, 1063 n. 2 (N.D.Cal.1986).4
At the present time, it is a matter of chance whether Title II or Title XVI benefits are figured first.5 The plaintiffs brought suit challenging the Secretary’s interpretation of “past-due benefits.” The plaintiffs argued that “past-due benefits” should be construed to mean gross, pre-off-set benefits. In other words, the attorney plaintiffs wanted their percentage paid out of the full Title II benefits before they [766]*766were reduced by the amount of Title XVI benefits paid to their client claimants. The complaint alleged jurisdiction under 28 U.S. C. §§ 1331 (federal question jurisdiction), 1343(a)(3) (civil rights), 1361 (mandamus), and 5 U.S.C. § 555(b) (Administrative Procedure Act — Attorney representation before administrative agencies). The Secretary, in her answer, asserted lack of subject matter jurisdiction.
Without ever certifying a class, the district court granted the appellees’ motion for an injunction and partial summary judgment.6 The court held that “for purposes of applying § 406 in concurrent claims cases, ‘past-due benefits’ means the actual Title II benefits payable before offset for Title XVI benefits.” Guadamuz, 662 F.Supp. at 1067. The court found that the Secretary’s interpretation of 42 U.S.C. §§ 406 and 1320a-6 was “ ‘manifestly contrary to the statute[s]’ ” and hence was not entitled to deference. Id. The court determined that the purpose of section 406 was to encourage effective legal representation of claimants by insuring that their lawyers will receive reasonable attorney’s fees. “By artificially reducing the amount of Title II benefits from which attorneys’ fees may be withheld ... the Secretary’s approach provides a significant disincentive to attorneys who might otherwise be willing to represent Social Security claim-ants_” Id. at 1064. The court ordered the Secretary to “calculate and withhold attorneys’ fees based on pre-offset Title II benefits. In furtherance of this order the Secretary shall issue instructions to all necessary offices to implement this order within fifteen days of this order.” Id. at 1067. The Secretary timely appealed. We have jurisdiction under 28 U.S.C. § 1291.
STANDARD OF REVIEW
Questions of law are reviewed de novo. United States v. McConney, 728 F.2d 1195, 1201 (9th Cir.) (en banc), cert. denied, 469 U.S. 824, 105 S.Ct. 101, 83 L.Ed.2d 46 (1984). The district court’s grant of permanent injunctive relief is reviewed for an application of erroneous legal principles. SEC v. Goldfield Deep Mines Co. of Nevada, 758 F.2d 459, 465 (9th Cir.1985).
ANALYSIS
I. Jurisdiction.
Both below, and on appeal, the Secretary challenged the subject matter jurisdiction of the district court. Nowhere in its order did the district court address this issue. The plaintiffs alleged jurisdiction under 28 U.S.C. §§ 1331, 1343(a)(3), 1361, and 5 U.S.C. § 555(b). The complaint also sought declaratory relief under 28 U.S.C. §§ 2201 and 2202. The existence of subject matter jurisdiction presents a question of law reviewed de novo by the court of appeals. Peter Starr Prod. Co. v. Twin Continental Films, Inc., 783 F.2d 1440, 1442 (9th Cir.1986). Even if the district court has failed to address the issue, this court on appeal may reach and decide the issue of subject matter jurisdiction. Csibi v. Fustos, 670 F.2d 134, 136 n. 3 (9th Cir.1982).
The Secretary argues that Weinberger v. Salfi, 422 U.S. 749, 756-67, 95 S.Ct. 2457, 2462-68, 45 L.Ed.2d 522 (1975), precludes subject matter jurisdiction over the plaintiffs’ suit. In Salfi, the Supreme Court held that 42 U.S.C. § 405(g) and (h) provide the sole means of review of determinations of the Secretary under the Social Security Act. Id. at 757, 95 S.Ct. at 2463.7 The [767]*767plaintiffs, a class of claimants under the Act, brought a class action challenging certain Social Security eligibility requirements. The Supreme Court held that section 405(h) precluded subject matter jurisdiction over these claims based on its express preclusion of jurisdiction under 28 U.S.C. §§ 1331 and 1346. Id. at 760-61, 95 S.Ct. at 2464-65. The Court also held that the district court lacked jurisdiction over unnamed members of the class because they did not meet the “finality” requirements of section 405(g). Id. at 763-64, 95 S.Ct. at 2465-66. The Court noted that the first requirement of 405(g) is a “final decision of the Secretary after a hearing.” Id. at 763, 95 S.Ct. at 2465. Therefore, as to class members, “the complaint [was] deficient in that it contained] no allegations that they h[ad] even filed an application with the Secretary, much less that he ha[d] rendered any decision, final or otherwise, review of which is sought.” Id. at 764, 95 S.Ct. at 2466.
Salfi would seem to preclude subject matter jurisdiction over the appellees’ class action. The appellees’ complaint alleged federal-question jurisdiction under section 1331 and 1343(a)(3).8 Under Salfi, 405(h) would preclude general federal question jurisdiction or any other means of judicial review except as provided for in the Act. Also, the unnamed class members here cannot meet the administrative exhaustion requirements of 405(g). However, the two named attorney members of the class alleged facts in their complaint showing that they made application for fees with the Secretary after having successfully represented the named beneficiary plaintiffs before the Secretary or in the district court and pursued all means of administrative review of the Secretary’s fee award.9
(a) The district court shall have original jurisdiction of any civil action authorized by law to be commenced by any person:
(3) To redress the deprivation, under color of any State law, statute, ordinance, regulation, custom or usage, with any right, privilege or immunity secured by the Constitution of the United States or by any Act of Congress providing for equal rights of citizens or of all persons within the jurisdiction of the United States.
At least the named attorneys in this putative class action are not jurisdic-tionally barred from asserting their claims. First, subsections 405(g) and (h) do not apply to them or their claims. See Humana of South Carolina, Inc. v. Califano, 590 F.2d 1070, 1081 n. 77 (D.C.Cir.1978). These subsections refer to the right of judicial review after any final decision of the Secretary “made after a hearing.” Attorneys have no right to a “hearing” before the Secretary concerning attorneys’ fees. Thomason v. Schweiker, 692 F.2d 333, 335 (4th Cir.1982). The setting of fees is committed to the Secretary’s discretion. Id. at 335-36. Where an action is committed to absolute agency discretion by law, however, courts have assumed the power to review allegations that an agency exceeded its legal authority, acted unconstitutionally, or failed to follow its own regulations. Ness Inv. Corp. v. United States Dep’t of Agric., 512 F.2d 706, 713-14 (9th Cir.1975); see also Thomason, 692 F.2d at 336, Garcia v. Neagle, 660 F.2d 983, 988 (4th Cir.1981) (citing Ness), cert. denied, 454 U.S. 1153, 102 S.Ct. 1023, 71 L.Ed.2d 309 (1982); Scanwell Laboratories, Inc. v. Shaffer, [768]*768424 F.2d 859, 874 (D.C.Cir.1970) (“[w]hen the bounds of discretion give way to the stricter boundaries of law, administrative discretion gives way to judicial review”). The plaintiffs’ complaint alleged that the Secretary’s interpretation and application of section 406 exceeded her legal authority. We hold, under Ness, that the district court and this court have jurisdiction over the named attorneys’ claims.
II. Secretary’s Interpretation of Section 406.
The complexity of this issue and many other issues in the Social Security area has prompted Congress to confer on the Secretary exceptionally broad authority to prescribe standards for applying sections of the Act. Schweiker v. Gray Panthers, 453 U.S. 34, 43, 101 S.Ct. 2633, 2640, 69 L.Ed.2d 460 (1981); Batterton v. Francis, 432 U.S. 416, 425, 97 S.Ct. 2399, 2405, 53 L.Ed.2d 448 (1977); Cubanski v. Heckler, 781 F.2d 1421, 1424 (9th Cir.1986). Congress has done so in regard to both Title II and Title XVI benefits. 42 U.S.C. § 405(a) (Title II) (“The Secretary shall have full power and authority to make rules and regulations and to establish procedures ... which are necessary or appropriate”); 42 U.S.C. § 1383(a) (Title XVI) (“Benefits under [Title XVI] shall be paid ... as will best effectuate the purposes of this title, as determined under regulations”). In particular, the Secretary has been explicitly granted the power to regulate the amount of reasonable attorneys’ fees. 42 U.S.C. § 406(a) (Title II) (“The Secretary may, by rule and regulation, prescribe the maximum [attorneys’] fees which may be charged for services”); 42 U.S.C. § 1383(d)(2) (Title XVI) (same). Under such a regime, the Secretary’s interpréta-tion of the statute is entitled to more than mere deference or weight. “Rather, the Secretary’s definition is entitled to ‘legislative effect’ because, ‘[i]n a situation of this kind, Congress entrusts to the Secretary, rather than to the courts, the primary responsibility for interpreting the statutory term.’ ” Gray Panthers, 453 U.S. at 44, 101 S.Ct. at 2640 (quoting Batterton, 432 U.S. at 425, 97 S.Ct. at 2405). Where the administrative choice represents a reasonable accommodation of conflicting policies that were committed to the agency’s care by statute, it should not be disturbed unless it appears in the statute or its legislative history that the accommodation is not one Congress would have sanctioned. United States v. Shimer, 367 U.S. 374, 383, 81 S.Ct. 1554, 1560, 6 L.Ed.2d 908 (1961); see also Capital Cities Cable, Inc. v. Crisp, 467 U.S. 691, 699-700, 104 S.Ct. 2694, 2700-01, 81 L.Ed.2d 580 (1984) (relied on Shimer). However, if the Secretary’s construction or application of the statute is arbitrary and capricious, or manifestly contrary to the statute, deference to the administrative interpretation is inappropriate. Chevron, U.S.A. Inc. v. Natural Resources Defense Council, Inc., 467 U.S. 837, 844, 104 S.Ct. 2778, 2782, 81 L.Ed.2d 694 (1984); Fagner v. Heckler, 779 F.2d 541, 543 (9th Cir.1985).10 Judge Patel found that the Secretary’s interpretation and implementation of section 406 was arbitrary and capricious as well as “manifestly contrary to statute.” Guadamuz, 662 F.Supp. at 1064, 1067.
The district court found that section 406 has two purposes: first, to protect claimants from exorbitant attorneys’ fees; and second, to encourage effective legal representation of claimants by insuring the maintenance of a Social Security bar by [769]*769insuring an attorney a reasonable fee. Id. at 1063-64.
The court found that the first purpose was accomplished under section 406 by the Secretary or court authorizing “a reasonable fee,” and by prohibiting attorneys from charging more than that fee. Id. at 1064. The court also found that the Secretary’s interpretation of “past-due benefits” did little to protect claimants in 406(a) cases where the case has not gone to court. The court noted that under 406(a) the Secretary’s interpretation will not affect the amount the attorney may charge the client because under (a) the amount “authorized” to the attorney is determined independently of the offset. Id.11 The claimant will still be responsible to his attorney for fees up to the authorized amount and the Secretary’s interpretation of “past-due benefits” has no effect on what the attorney may collect. Id.
As to the second purpose — the attorney “incentive” factor — the court found that the reduction of attorneys’ fees operated as a direct disincentive to attorneys taking Social Security cases. Especially in 406(b), court award cases, the fee awardable and collectible by an attorney may be severely reduced. Id. The court also found that the present procedure for figuring Title II and Title XVI benefits produced an arbitrary and capricious result. Id. Under today’s procedures, whether Title II or Title XVI benefits are paid first is purely a matter of chance depending on which monthly benefit check is processed first. The district court stated: “[T]wo attorneys who do the same work and achieve the same results for their respective clients may receive significantly different attorneys’ fees simply because one client’s Title II benefits are processed first while the other’s Title XVI benefits are processed first.” Id. at 1064-65.
The district court was undoubtedly correct in finding that some attorneys’ fees awards will be substantially reduced by the Secretary’s current interpretation of section 406, section 1320a-6 and associated procedures. The issue, however, is whether the interpretation or procedures are matters within the Secretary’s discretion and entitled to deference. As the lower court noted, five other circuits have approved either the Secretary’s interpretation of section 406 or her procedure of calculating Title II benefits after figuring Title XVI benefits.
In Burnett v. Heckler, 756 F.2d 621 (8th Cir.1985), an attorney challenged the reduction of his fee due to the Secretary’s application of the “windfall offset” provision. The attorney made the exact same claim as here — that his attorney’s fees should be computed pre-offset. The Eighth Circuit found that the Secretary’s procedure was consistent with the congressional goal of protecting claimants from exorbitant attorneys’ fees. The court stated that under the Secretary’s approach the claimant will receive more in benefits. Id. at 625-26.12 The court also found that the “direct payment” feature of section 406 was the primary incentive to attorneys rather than the actual amount received. That is, the court believed that attorneys are more interested in being insured payment of some fee and avoiding collection problems than receiving the highest possible fee. The court noted that the Secretary’s procedure [770]*770did not affect this aspect of section 406. Id. at 626. Given these determinations, the court found that the Secretary’s interpretation was not arbitrary or capricious nor did it exceed the Secretary’s authority. Id. at 625; see also McKenzie v. Bowen, 787 F.2d 1216, 1219 (8th Cir.1986) (“Although the statute is not altogether explicit in its offset of benefits formula, it certainly does not prohibit the calculation of [Title XVI] benefits first in concurrent applications.”); Lindsay v. Secretary, 612 F.Supp. 366, 368 (D.N.J.1985) (same); Gallo v. Heckler, 600 F.Supp. 1513, 1519-20 (E.D.N.Y.1985) (same).
In a closely related case, White v. Bowen, 835 F.2d 974 (2d Cir.1987), claimants brought a class action challenging the Secretary’s procedure for reimbursing the states for their interim assistance payments. By statute, only Title XVI benefits are reimbursable to states for interim assistance payments. The Secretary, therefore, in order to insure maximum reimbursement to the states, adopted a procedure of figuring Title XVI benefits first so they would not be offset by Title II benefits if they were paid first. The Second Circuit noted that “there simply is no clear statutory guidance on how to decide which retroactive benefits are to be calculated first.” Id. at 978. The court found that the Secretary’s procedural mechanism insured a source of reimbursement to state welfare agencies, and denied claimants a “windfall” due to the overpayment created by receipt of state interim assistance benefits, and by unreduced Title XVI and Title II monies. “Therefore, the Secretary’s approach in eliminating this windfall constitute^] a proper exercise of his discretion and represents a reasonable means of coordinating [Title II benefits], [Title XVI benefits], and state interim assistance programs.” Id. at 979.
All the other circuit courts that have addressed the issue have similarly concluded that the Secretary’s interpretation of section 406 and associated procedures for calculating Title II and Title XVI benefits in “concurrent claims” cases is entitled to deference. See Baker v. Bowen, 839 F.2d 1197, 1198-1201 (6th Cir.1988); Detson v. Schweiker, 788 F.2d 372, 376 (6th Cir.1986) (primary incentive to attorneys is 406’s “direct payment” feature not maximum attorneys’ fees); Wheeler v. Heckler, 787 F.2d 101, 106 (3d Cir.1986) (“if [Title XVI] is not calculated first when concurrent, retroactive awards of [Title XVI and Title II] benefits are made, the state may never be reimbursed”); Cuthbert v. Secretary, 784 F.2d 1157, 1160 (4th Cir.1985) (affirmed lower court’s dismissal of attorneys’ fees petition for lack of subject matter jurisdiction; agreed with Secretary’s definition of “past-due benefits” as those “payable”). As one court summarized, the Secretary’s decision is a balancing of all the various interests: (1) the policy of reducing windfalls where retroactive awards are made, (2) the encouragement of legal representation, (3) the decision to protect 75 percent of past-due Title II benefits, and (4) the need to reimburse the states for welfare assistance. Wheeler, 787 F.2d at 108. All of these courts, focusing on either the protection of clients from high attorneys’ fees or the need to reimburse state welfare agencies, have found the Secretary’s balancing of these interests to be properly within the Secretary’s discretion and entitled to deference.
We agree with the five other circuits that the district court should have deferred to the Secretary’s interpretation of sections 406 and 1320a-6. The district court primarily focused on the incentive created by the promise of a “reasonable” attorney’s fee to attorneys taking Social Security cases. The interest of an attorney in a “reasonable” fee is, however, only one of the sometimes divergent and complex interests involved. The Secretary has the statutory duty to balance all of the interests at issue. She chose to do so in a manner insuring to the states the maximum possible interim assistance reimbursement payments. Her method, at least in 406(b) cases, also insures to claimants the highest possible benefits. While attorneys may come up somewhat on the short end of this balancing process, it cannot be said that the attorneys’ interest has been completely ignored or that the Secretary has [771]*771acted arbitrarily or contrary to her statutory mandate. Perhaps a different or even more rational “mix” of benefits, reimbursements, and attorneys’ fees could have been reached; but, it is not the duty of the courts to choose the better or best policy alternative. In summary, the attorney is still assured direct payment of his fee, the claimant is assured the maximum possible benefits in many cases, and the states the maximum possible reimbursement. We hold that the district court erred by not deferring to the Secretary’s interpretation of 406 and associated procedures.
III. Administrative Procedure Act.
On appeal, the appellees also argue that the procedure and interpretation adopted by the Secretary violated the notice, comment and publication requirements of the Administrative Procedure Act (APA). 5 U.S.C. § 553(b)-(d). The plaintiffs alleged in their complaint that the Secretary’s action violated the APA. However, in their complaint they did not allege what section of the APA was violated or in what fashion. The district court did not address the APA issue in its opinion.
From the record, it is difficult for this court to address this issue. The Secretary’s regulation defining “payable” benefits under Title II as net post-offset benefits seems to have been promulgated pursuant to the notice, comment and publication procedures of the APA. See 20 C.F.R. § 404.408b (Preamble to final regulations implementing section 1320a-6); see also 42 Fed.Reg. 4986 (1982) (the initial publication of the regulations) (cited in Guadamuz, 662 F.Supp. at 1063). The “procedure” for calculating Title II and Title XVI benefits is perhaps a different matter.
Under the APA, only “substantive” agency rules must meet the Act’s notice, comment and publication requirements before final implementation. 5 U.S.C. § 553(b)(3)(A). Interpretive rules, however, are not subject to the Act’s strict limitation requirements. 5 U.S.C. § 553(d)(2). Substantive rules grant rights and impose obligations, while interpretive rules express an agency’s intended course of action, its tentative view of the meaning of a particular statutory term, or internal house-keeping measures organizing Agency activities. Zaharakis v. Heckler, 744 F.2d 711, 713 (9th Cir.1984) (quoting Batterton v. Marshall, 648 F.2d 694, 702 (D.C.Cir.1980)).
One court has held that calculating Title XVI benefits prior to calculating Title II benefits constitutes an interpretive rule not subject to the requirements of the APA. McKenzie, 787 F.2d at 1222. The court noted that an interpretive rule only clarifies or explains existing law or regulations, and may include an administrative construction of a statute. Id. We agree with the McKenzie court, especially given that the Secretary’s present random order of calculation of Title II and Title XVI benefits is hardly a “procedure” at all. The “procedure” does not change any existing law or policy, nor does it remove any previously existing right of claimants or their attorneys. It has never been the policy of the Secretary to determine attorneys’ awards based on gross, pre-offset Title II benefits. The “procedure” simply fills in some gaps created by Congress’ creation of the windfall offset provision. See Powderly v. Schweiker, 704 F.2d 1092, 1098 (9th Cir.1983). We hold that failure to follow the APA’s formal rule-making requirements in adopting this procedure is not fatal to the Secretary’s approach.
CONCLUSION
The district court should have deferred to the Secretary’s interpretation of 406 and its associated procedures. The Secretary’s approach also does not violate the notice and comment requirements for substantive rule-making under the APA. We REVERSE the district court’s grant of the injunction ordering the Secretary to calculate and withhold attorneys’ fees based on pre-offset Title II benefits.
REVERSED.