OPINION OF THE COURT
BECKER, Circuit Judge.This opinion concerns an appeal by the Secretary of Labor (the “Secretary”) from the district court’s judgment for defendant, DialAmerica Marketing, Inc., in an action brought by the Secretary under the Fair *1379Labor Standards Act, 29 U.S.C. §§ 201-219 (1982) (the “FLSA”). The Secretary alleged that DialAmerica had failed to comply with the minimum-wage and record-keeping provisions of the FLSA. The district court determined that the two groups of workers in question, persons who research telephone numbers for DialAmerica in their homes and those who also distribute telephone-research work to other home researchers (“distributors”), are independent contractors, not “employees” subject to the provisions of the FLSA. The court refused, however, to grant defendant’s request for attorneys’ fees under the Equal Access to Justice Act, 28 U.S.C. § 2412 (1982), holding that the Secretary’s position in the case, though incorrect, was substantially justified.
Because we believe the district court misapplied the relevant legal test for determining “employee” status under the FLSA, we hold that the court erred in concluding that the home researchers were not employees of DialAmerica. On the other hand, we hold that the district court did not err in its conclusion that the distributors were independent contractors rather than employees. Moreover, we agree with the court’s determination that the Secretary’s position in this case was substantially justified and therefore that DialAmerica is not entitled to an award of attorneys’ fees. Accordingly, we will in part affirm and in part reverse the judgment of the district court. Further, we will remand the case so that the district court may determine whether DialAmerica has in fact complied with the requirements of the FLSA in connection with its employment of the home researchers.
I. FACTS'1
DialAmerica Marketing, Inc., is a telephone marketing firm that operates in twenty states and maintains its principal place of business in Teaneck, New Jersey. A major aspect of DialAmerica’s business is the sale of magazine renewal subscriptions by telephone to persons whose subscriptions have expired or are near expiration. Under this “expire” program, publishers supply DialAmerica with the names and addresses of subscribers, and DialAmerica locates phone numbers for these subscribers and telephones them in an effort to sell renewal subscriptions.
Initially, DialAmerica located subscribers’ phone numbers by employing in-house researchers who would find numbers by consulting telephone books and calling directory-assistance operators. In 1976, Dial-America initiated its home-researcher program as a method of increasing its capacity to locate needed telephone numbers. Under the program, persons would travel to DialAmerica’s office in Teaneck and pick up cards, each of which contained the name and address of a subscriber whose telephone number was needed. They would then take these cards home, use telephone books or operators to locate the telephone numbers of the persons listed, write the numbers on the cards in a specified manner, and then return the completed cards to DialAmerica’s office. The home-research program remained in effect until 1982, when it was discontinued.
In June 1979, DialAmerica began a computerized telephone-number search operation. During the period from 1979 to 1982, this operation accounted for the locating of about 50% of all telephone numbers searched by DialAmerica. Another 20% of the numbers were located by the company’s in-house researchers. The home-research program accounted for the discovery of about 4%-5% of all numbers sought; the remainder apparently were never found.
Upon deciding to begin the home-research program, DialAmerica sought researchers by placing a total of five newspaper advertisements, the last of which ran in May 1979. After that date, prospective home researchers approached DialAmerica after learning about the program from others. Those desiring such work met with an officer of the company. During the meeting, they were instructed how properly to *1380complete the magazine expire cards, and they were asked to sign a document labeled an “Independent Contractor’s Agreement.” DialAmerica never rejected anyone who applied for such work, although it did subsequently discharge some home researchers who performed their work inadequately.
Upon signing the agreement to do home-research work, a worker was given an initial box of 500 cards to be researched. The worker was expected to set up an appointment to return the cards one week later. Appointments were designed to prevent too many of the home researchers (generally women some of whom brought their small children along) from being present in the office at one time.
Home researchers were free to choose the weeks and hours they wanted to work and the number of cards they wished to research (subject to a 500-card minimum per batch and to the sometimes-limited availability of cards). DialAmerica instructed the researchers not to look for the phone numbers of schools, libraries, government installations, or hospitals. The researchers were instructed to keep all duplicate cards separate. DialAmerica required the use of a black ink or Flair pen and sold such pens to the researchers. The researchers were required to place their initials and the letter “H” (for home researcher) on each card they completed. When DialAmerica installed a machine to read and process the completed cards automatically, DialAmerica required that the home researchers place numbers on the cards by writing them in ink around dots pre-printed on the cards. Finally, the home researchers were instructed not to wear shorts when they came to the office to pick up or deliver cards. DialAmerica did not, however, require the home researchers to keep records of the hours that they worked.
During the course of this program, six or seven of the home researchers acted as distributors for DialAmerica, picking up and delivering the cards of other home researchers. In some cases, the distributors recruited new home researchers and instructed them as to the proper method of completing the cards. Initially, DialAmerica .instructed the distributors to require each of their distributees to sign the same independent contractor’^ agreement that was given to the other home researchers. DialAmerica retained copies of these signed agreements. Later in the program, however, DialAmerica chose not to require distributees to sign the agreements, and it discarded the ones that it had in its possession.
When the program began in 1976, Dial-America paid its home researchers five cents for every completed telephone-number card. At the same time, DialAmerica was paying its in-house researchers the minimum-wage hourly rate. The piece rate paid to home researchers was eventually raised to seven cents and then to ten cents per card. On special projects, DialAmerica set the piece rate higher to compensate for the lower percentage of correct numbers that were likely to be found. Generally, one week after a home researcher had returned a group of cards, DialAmerica would make payment to that researcher of a check equal to the piece rate times the number of cards completed. DialAmerica made no deductions from these checks. Distributors were paid a lump sum equivalent to one cent more than the going piece rate for every completed card they returned to DialAmerica, regardless of whether the card had been completed by them or their distributees. Initially, Dial-America instructed the distributors to pay distributees the going piece rate and to keep the remaining one cent per card for themselves. Later, however, DialAmerica gave no instructions as to the amount to be paid to distributees, allowing the distributors to negotiate their own piece rates.
II. PROCEDURAL HISTORY
The Secretary of Labor filed the complaint in this action in the United States District Court for the District of New Jersey on December 30, 1981, alleging that DialAmerica was willfully compensating the home researchers and distributors at a *1381rate below the minimum wage, in violation of 29 U.S.C. §§ 206, 215(a)(2), and that Dial-America had willfully failed to keep adequate records of its employees’ wages, hours, and other conditions of employment, in violation of 29 U.S.C. §§ 211, 215(a)(5). The Secretary sought to enjoin DialAmerica from further violating the FLSA and to obtain other appropriate relief, including the payment of wages found to be due and owing. DialAmerica denied the Secretary’s allegations, contending that its home researchers and distributors were not “employees” under the FLSA. Nevertheless, on June 1, 1982, DialAmerica discontinued its home-researcher program as a result of the filing of this lawsuit.
At a status conference, the district court, believing that there were no material facts in dispute, suggested to counsel that both parties attempt to stipulate the facts in the case and then file cross-motions for summary judgment.2 Counsel agreed to do so, but each side reserved the right to present testimony on any issues of fact that remained in dispute. As it developed, these remaining issues of fact included:
(1) the extent to which home researchers and distributors were dependent on DialAmerica;
(2) the extent to which they had an opportunity for profit or loss;
(3) thé extent to which they exercised initiative, business judgment, or foresight in their activities;
(4) the extent of any financial investment in conjunction with their work for DialAmerica; and
(5) the extent to which the services provided by the home researchers and distributors were an integral part of Dial-America’s business.3
The district court then held a two-day evidentiary hearing in which the Secretary presented ten witnesses and DialAmerica presented seven witnesses. On January 26, 1984, in an order accompanied by a letter opinion, the court granted the motion for summary judgment which DialAmerica had filed pursuant to Fed.R.Civ.P. 56. The court subsequently filed an order and accompanying letter opinion, denying Dial-America’s request for attorneys’ fees. The Secretary now appeals the district court’s grant of summary judgment (No. 84-5217). DialAmerica appeals the court’s denial of its application for the award of attorneys’ fees (No. 84-5245). Both appeals were timely. This court has jurisdiction pursuant to 28 U.S.C. § 1291 (1982).
Given that there were several disputed issues of material fact — which the district court resolved only after taking testimony from seventeen witnesses — we find it difficult to understand why the court characterized its decision as a summary judgment. Although the court inappropriately labelled its judgment, its course of action was correct. The two-day hearing was sufficient for the court to find the relevant facts, and we would gain nothing beyond delay by reversing the district court’s grant of summary judgment and remanding the case for further fact-finding. It appears that there exists no additional documentary evidence or testimony which, if presented at trial, would have aided significantly in the adjudication of this case. Thus, we will simply treat the court’s letter opinions as the findings of fact and conclusions of law required by Fed.R.Civ.P. 52,4 and its orders as judg*1382ments entered after trial pursuant to Fed. R.Civ.P. 58. We will review the court’s findings of fact under a “clearly erroneous” standard. Our review of the district court’s legal conclusions is, of course, plenary.
III. THE APPLICABLE LAW: THE SUREWAY CLEANERS TEST
Congress and the courts have both recognized that, of all the acts of social legislation, the Fair Labor Standards Act has the broadest definition of “employee.” See 81 Cong.Rec. 7657 (remarks of Senator Hugo L. Black); Equal Employment Opportunity Commission v. Zippo Manufacturing Co., 713 F.2d 32, 37 (3d Cir.1983). In determining whether a worker is an “employee” of another person or organization within the purview of the FLSA,5 the Supreme Court, in Rutherford Food Corp. v. McComb, 331 U.S. 722, 67 S.Ct. 1473, 91 L.Ed. 1772 (1947), emphasized that the circumstances of the whole activity should be examined rather than any one particular factor. Id. at 730, 67 S.Ct. at 1476; see also Bartels v. Birmingham, 332 U.S. 126, 127, 67 S.Ct. 1547, 1548, 91 L.Ed. 1947 (1947) (determination of “employee” status under the Social Security Act); United States v. Silk, 331 U.S. 704, 705, 67 S.Ct. 1463, 1464, 91 L.Ed. 1757 (1947) (same).
In Rutherford, the Court held that boners who worked in a slaughterhouse were employees under the FLSA, even though they were paid collectively on a piece-rate basis, owned their own tools, and worked under individual employment contracts. Rutherford, 331 U.S. at 730, 67 S.Ct. at 1746. Specific factors examined by the Rutherford Court in rendering its decision included: whether the work being done is part of the integrated unit of production: whether the workers shift from one workplace to another as a unit; whether managers from the alleged employer keep in close touch with the workers; and whether the work is more like piecework than an enterprise dependent for success on the workers’ initiative, judgment or foresight. Id. at 729-30, 67 S.Ct. at 1476-77.
Recently, the Court of Appeals for the Ninth Circuit, in Donovan v. Sureway Cleaners, 656 F.2d 1368 (9th Cir.1981), refined the test for “employee” status originally set forth initially by the Supreme Court in Rutherford. This test lists six specific factors for determining whether a worker is an “employee”:
1) the degree of the alleged employer’s right to control the manner in which the work is to be performed; 2) the alleged employee’s opportunity for profit or loss depending upon his managerial skill; 3) the alleged employee’s investment in equipment or materials required for his task, or his employment of helpers; 4) whether the service rendered requires a special skill; 5) the degree of permanence of the working relationship; 6) whether the service rendered is an integral part of the alleged employer’s business.
656 F.2d at 1370 (quoting Real v. Driscoll Strawberry Associates, 603 F.2d 748, 754 (9th Cir.1979)).
In addition, Sureway Cleaners instructs that neither the presence nor absence of any particular factor is dispositive and that courts should examine the “circumstances of the whole activity,” 656 F.2d at 1370 (citing Rutherford Food Corp. v. McComb, 331 U.S. 722, 730, 67 S.Ct. 1473, 1476, 91 L.Ed. 1772 (1947)), and should consider whether, as a matter of economic reality, the individuals “are dependent upon the business to which they render service.” *1383656 F.2d at 1370 (citing Bartels v. Birmingham, 332 U.S. 126, 130, 67 S.Ct. 1547, 1549, 91 L.Ed. 1947 (1947)). The Sureway Cleaners test has been previously cited with approval by this court in dicta. See Zippo, 713 F.2d at 36-37 (3d Cir.1983). We now adopt it as the standard for determining “employee” status under the FLSA, and we will proceed to analyze the district court’s decision in relation thereto.'
IV. THE DISTRICT COURT OPINION
The district court concluded that neither those persons who performed telephone-number research at home nor those who distributed search cards to the home researchers were “employees” under the FLSA. In reaching its conclusion, the court did not apply the Sureway Cleaners test as such. It did, however, rely on the judicial decisions upon which the Sureway Cleaners test is based. Moreover, the court identified as relevant all but one of the elements of the Sureway Cleaners test.6 Nevertheless, the court’s opinion is based on only two of these elements: (1) the extent of DialAmerica’s control over the home researchers; and (2) the extent to which the home researchers were economically dependent on DialAmeriea. The court reasoned that, because these researchers worked at home without supervision and at the dates and times of their own choosing, DialAmeriea exercised little control over them. Moreover, the court found that the home researchers were not economically dependent on DialAmeriea because, for most of them, the money they earned from DialAmeriea was not the primary source of family income, but merely “pocket money.” We turn to an examination of the district court’s analysis in the context of the entire Sureway Cleaners test — the six itemized factors and the economic-realities consideration.
V. THE HOME RESEARCHERS
In its opinion, the district court conceded that three of the six Sureway Cleaners factors, when applied to the home researchers, weighed in favor of the conclusion that they were “employees.” As the district court stated:
It cannot be denied that, for the most part, the investment of these workers was not great, the opportunity for profit and loss was small and the skills required were few.
Donovan v. DialAmeriea Marketing, Inc., Civil No. 81-4020, letter op. at 7 (D.N.J. Jan. 26, 1984). These findings are not only supported in the record, they are clearly correct.7
The district court devoted most of its discussion, however, to explaining that defendant had very little control over the manner in which the home researchers did their work. The court emphasized that the home researchers had the freedom to work at any time and for as many hours as they desired, and that they were not directly supervised by defendant. See id. at 4-5.8 Had the district court been analyzing the status of a group of in-house workers, the court’s emphasis on these facts would have been appropriate. But in the context of this case — one involving homeworkers — the court’s emphasis was misplaced.
*1384That the home researchers could generally choose the times during which they would work and were subject to little direct supervision inheres in the very nature of home work. Yet, courts have held consistently that the fact that one works at home is not dispositive of the issue of “employee” status under the FLSA. In a seminal decision, Goldberg v. Whitaker House Cooperative, 366 U.S. 28, 81 S.Ct. 933, 6 L.Ed.2d 100 (1961), the Supreme Court held that members of a cooperative who made knitted goods in their homes and were paid on a piece-rate basis,9 were “employees” under the FLSA. Id. at 33, 81 S.Ct. at 936. The Court examined, inter alia, the legislative history of the FLSA and determined that, in general, homeworkers were intended to be encompassed by the Act. See id. at 30-32, 81 S.Ct. at 935-36. The Court then examined the specific homeworkers at issue and, upon analyzing the economic reality of their whole situation, concluded that they were indeed “employees”:
The members are not self-employed; nor are they independent, selling their products on the market for whatever price they can command. They are regimented under one organization, manufacturing what the organization desires and receiving the compensation the organization dictates. Apart from formal differences, they are engaged in the same work they would be doing whatever the outlet for their products. The management fixes the piece rates at which they work; the management can expel them for substandard work or for failure to obey the regulations. The management, in other words, can hire or fire the homeworkers.
Goldberg, 366 U.S. at 32-33, 81 S.Ct. at 936 (footnote omitted).
Other federal court rulings have been consistent with Goldberg, holding that homeworkers in various situations were “employees” under the FLSA.10 Thus, the facts relied on by the district court in concluding that defendant had only a slight degree of control over the manner in which the home researchers did their work were, to a large extent, insignificant. The district court therefore misapplied and overemphasized the right-to-control factor in its analysis.
The district court did not apply two other factors specified in the Sureway Cleaners test: the degree of permanence of the working relationship and whether the service rendered is an integral part of the alleged employer’s business. The working relationship between the home researchers and DialAmerica was, for the most part, not a transitory one. Although there was testimony presented that several researchers performed telephone calling services for other organizations following the termination of their work for the defendant, this was not true generally. Moreover, there was no evidence to show that more than three among dozens of home researchers performed similar services for another organization while he or she *1385was working for the defendant. In short, the home researchers did not transfer their services from place to place, as do independent contractors. See Donovan v. Sureway Cleaners, 656 F.2d 1368, 1372 (9th Cir.1981). Each worked continuously for the defendant, and many did so for long periods of time. As such, the permanence-of-working-relationship factor indicates that the home researchers were “employees” of the defendant.
The district court also did not expressly consider whether the service rendered by the home researchers was an integral part of the defendant’s business. Given the evidence in the record, we conclude that it was. Although DialAmerica contends that beginning in June 1979, the home researchers accounted for the location of only 4%-5% of the total number of telephone numbers sought by defendant, this contention bears little relevance to the integral-economic-relationship factor. The factor relates not to the percentage of total work done by the workers at issue but to the nature of the work performed by the workers: does that work constitute an “essential part” of the alleged employer’s business? See Sureway Cleaners, 656 F.2d at 1372; Hodgson v. Ellis Transportation Co., 456 F.2d 937, 940 (9th Cir.1972). In other words, regardless of the amount of work done, workers are more likely to be “employees” under the FLSA if they perform the primary work of the alleged employer.
In this case, the primary work of the defendant is locating phone numbers of various people and calling them to sell particular products. The home researchers were engaged in the location of phone numbers, and their work was therefore an integral part of defendant’s business. Thus, consideration of the integral-economic-relationship factor also weighs in favor of the conclusion that the home researchers were “employees” of the defendant.
The final consideration included within the Sureway Cleaners test is whether, as a matter of economic reality, the workers at issue “ ‘are dependent upon the business to which they render service.’ ” Sureway Cleaners, 656 F.2d at 1370, (quoting Bartels v. Birmingham, 332 U.S. 126, 130, 67 S.Ct. 1547, 1549, 91 L.Ed. 1947 (1947)). The district court clearly misinterpreted and misapplied this part of the analysis. The court reasoned that, because many of the home researchers used the money they earned from their work only as a secondary source of income for their households, they were not economically dependent upon DialAmerica. There is no legal basis for this position. The economic-dependence aspect of the Sureway Cleaners test does not concern whether the workers at issue depend on the money they earn for obtaining the necessities of life, as the district court suggests. Rather, it examines whether the workers are dependent on a particular business or organization for their continued employment. See Bartels v. Birmingham, 322 U.S. at 130, 67 S.Ct. at 1549; Equal Employment Opportunity Commission v. Zippo Manufacturing Co., 713 F.2d at 37; Usery v. Pilgrim Equipment Co., 527 F.2d 1308, 1311 (5th Cir.), cert. denied, 429 U.S. 826, 97 S.Ct. 82, 50 L.Ed.2d 89 (1976).11
The home researchers in this case were not in a position to offer their services to many different businesses and organizations. They worked on a continuous ba*1386sis with DialAmerica and were able to work only when and if DialAmerica was in need of their services. Consequently, the home researchers were economically dependent on DialAmerica, indicating that they were indeed “employees” of the defendant under the FLSA.
In summary, of the six factors and one general consideration identified by Sure-way Cleaners as the basis for determining “employee” status, only one factor weighs in favor of the conclusion that the home researchers were not “employees.” And that factor, the right-to-control factor, was overemphasized by the district court because homeworkers by their very nature are generally subject to little supervision and control by an alleged employer. Federal courts have consistently held homeworkers of many varieties to be “employees” under the FLSA.
Thus, although most of the facts in this case are undisputed and we accord due deference to the district court’s findings as to the remaining disputed facts, we nevertheless must conclude, as a matter of law, that the district court erred in holding that the home researchers were not “employees” of the defendant under the FLSA. Accordingly, we will reverse that portion of the district court’s judgment and remand so that the district court may calculate the amount of back pay, if any, to which the home researchers are entitled under the minimum-wage provisions of the Act.
VI. THE DISTRIBUTORS
The district court concluded that the six or seven home researchers who distributed telephone-number research cards to the other home researchers were also not “employees” under the FLSA. In reaching its decision, the court again did not consider all of the factors specified in the Sureway Cleaners test for determining “employee” status. Nevertheless, upon application of the entire Sureway Cleaners test, we agree that the distributors were not “employees” and were not subject to the minimum-wage protection of the FLSA for their work in delivering cards to and from other home researchers.12
With respect to the right-to-control factor, the district court correctly found that the defendant exercised little control over the distributors’ delivery of cards. The distributors were permitted to recruit their own distributees, and some of them did so. Although the defendant initially kept records of all distributees, it eventually relied on the distributors to maintain those records.
Moreover, we also defer to the district court’s finding that the distributors risked financial loss if they did not manage their distribution network properly. The distributors were responsible for paying all of their expenses, which consisted primarily of transportation expenses. And each distributor had the authority to set the rate at which its distributees would be paid.13 Thus, theoretically at least, distributors could lose money if their expenses outweighed their revenues.
The distributors also had to make an investment in their business. Again, this investment consisted primarily of transpor*1387tation expenses.14 One distributor also used paid advertising in an effort to gain more distributees. Consideration of the investment factor, therefore, supports the conclusion that the distributors were independent contractors.
The distributors’ need for special skills to do their work was another finding of fact identified by the district court as a basis for its conclusion. The distributors needed to possess some degree of managerial skill to ensure that their revenues exceeded expenses. Moreover, it was necessary for the distributors to be able to keep records regarding the number of cards delivered to, and completed by, each distributee so that proper payment could be made. Some distributors benefitted from their skill in persuading others to become distributees, and they certainly exercised business-like initiative in this regard. The “skill” factor favors independent-contractor status.
In terms of the permanence of the working relationship, many distributors did perform delivery work for DialAmerica continuously for several years. And there was no evidence that the distributors were doing similar delivery work for any other organizations, although they were free to do so. Thus, consideration of this factor would weigh in favor of treating distributors as “employees” of DialAmerica.
The distribution of cards to home researchers, per se, is probably not an integral part of defendant’s business. As stated previously, defendant’s business consists primarily of locating telephone numbers for various people and calling them to sell particular products. The delivery of telephone-number search cards to home researchers is more properly characterized as an incident to defendant’s business, rather than an integral part of it. As such, application of this factor in the Sureway Cleaners test favors the conclusion that the distributors are not “employees” as defined by the FLSA.
Finally, the Sureway Cleaners test examines the circumstances of the whole activity and considers whether, in this case, the distributors are economically dependent on the defendant. It is more likely than not that the distributors were economically dependent. Although defendant did not prohibit these persons from performing distribution work for other organizations, there was no evidence that any of them did so, either during or following the period in which they worked for the defendant. Presumably, all of the distributors ceased doing distribution work when defendant ceased providing such work for them. Thus, for the most part, the distributors were dependent on DialAmerica for continuing their work as distributors.
In summary, all of the factors in the Sureway Cleaners test, when applied to the distributors, do not lead to the same conclusion. Having considered the evidence with appropriate deference to the district court’s fact-finding, we note that some factors support the conclusion that the distributors are “employees,” while others do not. Although the question is admittedly close, we hold that the distributors qua distributors were not employees under the FLSA because they operated more like independent contractors than like employees of DialAmerica. The distributors were subject to minimal oversight or control over their distribution activities. Moreover, they faced a real opportunity for either a profit or loss in their operations, depending upon the amount of their investment and their skills in management. Finally, their work as distributors was not an integral part of DialAmerica’s business and thus was less likely to be performed by an “employee” of DialAmerica.
As a result of our decision in this case, DialAmerica may be held liable for not paying the home researchers the minimum wage, even though the distributors— who are held not to be employees of Dial-America — had discretion in setting the pay *1388rates of some of these home researchers (their distributees). Such a result is possible because the distributors’ status as independent contractors does not necessarily imply that they have the sole responsibility of paying their distributees the minimum wage required by the FLSA. Another employer — in this case, DialAmerica-may share that responsibility. See Real v. Driscoll Strawberry Associates, Inc., 603 F.2d 748, 756 (9th Cir.1979) (the independent-contractor status of one party standing in the position of the direct employer of crop growers does not, as a matter of law, prevent the contractee from being a joint employer of these crop growers under the FLSA); Hodgson v. Griffin & Brand of McAllen, Inc., 471 F.2d 235, 237 (5th Cir.) (claimed independent-contractor status of crew leaders, who supplied field workers for defendant-harvester, did not negate the possibility that defendant was an “employer” of the workers for FLSA purposes), cert. denied sub nom. Griffin & Brand of McAllen, Inc. v. Brennan, 414 U.S. 819, 94 S.Ct. 43, 38 L.Ed.2d 51 (1973); see also Boire v. Greyhound Corp., 376 U.S. 473, 481, 84 S.Ct. 894, 898, 11 L.Ed.2d 849 (1964) (the independent-contractor status of firm under contract with defendant to clean bus terminals does not affect determination whether the cleaners are employees of defendant for purposes of the National Labor Relations Act).
Since all the home researchers were employees of DialAmerica — by application of the relevant legal test — it was DialAmerica’s responsibility to ensure that the distributors paid their respective distributees the minimum wage. Indeed, when distributorships were first initiated, DialAmerica instructed the distributors on precisely the amount of money to be paid to each distributee. Although DialAmerica subsequently granted its distributors some discretion in paying distributees, DialAmerica demonstrated that it could control the rate of payment to distributees if it so desired.
VII. ATTORNEYS’FEES
Following the district court’s grant of defendant’s motion for summary judgment in this action brought by the Secretary of Labor, defendant filed with the court an application for attorneys’ fees pursuant to the Equal Access to Justice Act (EAJA), 28 U.S.C. § 2412 (1982).15 The Act provides in relevant part that “a court may award reasonable fees and expenses of attorneys, ... to the prevailing party in any civil action brought by or against the United States or any agency and any official of the United States acting in his or her official capacity in any court having jurisdiction of such action.” 28 U.S.C. § 2412(b) (1982). The Act provides an exception to the award of attorneys' fees if “the court finds that the position of the United States was substantially justified or that special circumstances make an award unjust.” 28 U.S.C. § 2412(d)(1)(A). The district court denied defendant’s application for attorneys’ fees in an order and accompanying letter opinion dated March 5, 1984. Although it found defendant to be a “prevailing party” as defined by the Act, the court found that the Secretary’s position was “substantially justified” under the three-part test set forth by this court in Dougherty v. Lehman, 711 F.2d 555 (3d Cir.1983). DialAmerica appeals this judgment.
By our decision, DialAmerica does not prevail on the primary issue in this case, namely whether home researchers were “employees” under the FLSA. Yet, Dial-America prevails on the less significant issue of the status of the distributors. We will therefore assume, without deciding, that DialAmerica remains a “prevailing party” for purposes of the EAJA. We will now turn to a review of the district court’s determination that the position of the United States was “substantially justified.”
*1389The position of the United States includes not only its litigation position but also the agency position that made the lawsuit necessary. Dougherty, 711 F.2d at 563 n. 12; Natural Resources Defense Council, Inc. v. EPA, 703 F.2d 700, 708 (3d Cir.1983).16 Substantial justification “constitute[s] a middle ground between an automatic award of fees to a' prevailing party and an award made only when the government’s position was frivolous.” Dougherty, 711 F.2d at 563. The government has the burden of proving that it was substantially justified. Id. at 561. To satisfy its burden the government must demonstrate (1) a reasonable basis in truth for the facts alleged; (2) a reasonable basis in law for the theory propounded; and (3) a reasonable connection between the facts alleged and the legal theory advanced. Citizens Council of Delaware County v. Brinegar, 741 F.2d 584, 593 (3d Cir.1984); Dougherty, 711 F.2d at 564.
The district court determined that the Secretary of Labor had satisfied its burden of proving the existence of each element in this three-part test. We agree.17
The district court was correct in its conclusion that there was a reasonable basis in truth for the facts alleged by the Secretary. Most of the facts in the case were not disputed by the parties, and those that were disputed were in the nature of inferences drawn from the undisputed basic facts. Moreover, we concur with the court’s determination that there existed a reasonable basis in law for the Secretary’s position that the distributors were “employees” of DialAmerica, rather than independent contractors. In formulating its position, the Secretary relied on numerous judicial decisions which held that workers who perform their duties outside the office or factory and who are paid on a piece-rate basis are nevertheless “employees” under the FLSA. See supra note 11. Finally, we agree with the district court that the facts alleged by the Secretary reasonably supported the legal theory he advanced. As we observed in our analysis of the distributors’ status, not all of the relevant factors support our conclusion. Analysis of the permanency-of-working-relationship factor as well as the economic-dependence consideration supports the Secretary’s position that the distributors are employees rather than independent contractors. The closeness of the case, see supra p. 1388, is also evidence of substantial justification. We therefore concur with the district court’s determination that the Secretary of Labor’s position in this case was substantially justified. Thus, we will affirm the court’s order denying DialAmeriea’s application for attorneys’ fees.
VIII. CONCLUSION
In summary, therefore, we hold that the persons who performed telephone-number research at home were “employees” of Dial-America under the FLSA. DialAmerica was obligated to pay them the applicable minimum wage and to comply with the other provisions of the Act. Those home researchers who also distributed telephone-number research cards to other home researchers were not “employees” while they were engaged in the act of distributing. Therefore, they were not entitled to the minimum-wage protection of the FLSA for their distribution work. Finally, we hold that DialAmerica is not entitled to an award of attorneys’ fees under the Equal Access to Justice Act.
Accordingly, we will affirm in part and reverse in part the judgment of the district court. We will remand so that the court *1390may determine whether DialAmerica has satisfied the minimum-wage and record-keeping provisions of the FLSA with respect to the home researchers. If the court determines that DialAmerica has not complied with the FLSA, the court may then order appropriate relief, including the payment of back wages.
. The facts recited in this opinion arc undisputed except as otherwise noted.
. Counsel and the court had already agreed to bifurcate the case. First, the court would determine whether the workers in question were "employees" under the FLSA. Second, if they were held to be "employees,” the court would then consider whether they were entitled to backpay or other relief. Any action on the second part of the case was to be suspended until the first part was completed.
. See Donovan v. DialAmerica, Civil No. 81-4020 (D.N.J., June 4, 1982) (pre-trial order, part VIII).
. The court’s letter opinion of January 26, 1984, includes some statements that are most accurately characterized as findings of fact. Examples of such findings by the court include statements that the home-research work at issue did not require a great investment nor much skill, presented little opportunity for profit or loss, and operated under the barest possible struc-. ture. Donovan v. DialAmerica Marketing, Inc., Civil No. 81-4020, letter op. at 7 (D.N.J. Jan. 26, 1984). Another example is the court’s observation that "distributors were small business per*1382sons, who controlled their own fleet of distributees subject only to the scantiest oversight by DialAmerica.” Id. at 8.
. As the district court aptly observed, the definitions included in the FLSA provide little assistance in determining the meaning of the word "employee." "Employee” is defined by the Act as "any individual employed by an employer." 29 U.S.C. § 203(e)(1) (1982). “Employer” is defined to include “any person acting directly or indirectly in the interest of an employer in relation to an employee....” 29 U.S.C. § 203(d) (1982). Finally, the Act states “‘Employ’ includes to suffer or permit to work.” 29 U.S.C. § 203(g) (1982).
. The district court relied primarily on the five factors specified by the Supreme Court in United States v. Silk, 331 U.S. 704, 716, 67 S.Ct. 1463, 1469, 91 L.Ed. 1757 (1947) and Rutherford Food Corp. v. McComb, 331 U.S. 722, 730, 67 S.Ct. 1473, 1476, 91 L.Ed. 1772 (1947), as well as the general economic-dependence consideration propounded by the Court in Bartels v. Birmingham, 332 U.S. 126, 130, 67 S.Ct. 1547, 1549, 91 L.Ed. 1947 (1947). Only the integral-economic relationship factor, which is the sixth factor listed in Sureway Cleaners, was not identified as relevant by the district court.
. DialAmeriea had contended that some of the home researchers made a significant investment in their business, particularly in the purchase of speed dialers and telephone directories.
. The court did recognize that defendant exercised some "minimal oversight” over the home researchers, such as requiring that the search cards be filled out properly, that cards be returned generally one week after obtaining them, and that proper dress be worn while visiting the office. The court, however, found little significance in these requirements.
. The Supreme Court had held earlier that workers paid on a piece-rate basis were encompassed by the Fair Labor Standards Act. See United States v. Rosenwasser, 323 U.S. 360, 361, 65 S.Ct. 295, 296, 89 L.Ed. 301 (1945).
. See e.g., Hodgson v. Cactus Craft of Arizona, 481 F.2d 464, 467 (9th Cir.1973) (persons who manufacture novelty and souvenir gift items in their homes and are compensated at a piece rate are entitled to the minimum wage under the FLSA); Silent Woman, Ltd. v. Donovan, 585 F.Supp. 447, 451 (E.D.Wis.1984) (persons who do needlework in their homes for a corporation, set their own hours, and are compensated at a piece rate set by the corporation are "employees" under the FLSA); Hodgson v. Rancourt, 336 F.Supp. 1119, 1122 (D.R.I.1972) (persons who type labels and envelopes in their home for defendant and who had to complete work by a certain date set by defendant were "employees" of defendant under the FLSA); Wirtz v. McGhee, 244 F.Supp. 412, 415 (E.D.S.C.1965) (persons manufacturing doll clothes and bodies in their homes constituted “employees" of defendant); Mitchell v. Nutter, 161 F.Supp. 799, 806 (D.Me.1958) (homeworkers who knitted and crocheted infants' outerwear for distributor at a piece rate were “employees" under FLSA); Walling v. Freidlin, 66 F.Supp. 710, 712 (M.D.Pa.1946) (expressly overruling an earlier decision, Walling v. Todd, 52 F.Supp. 62 (M.D.Pa.1943), and holding that homeworkers to whom employer delivered waste rags, which homeworkers cut, served, and wound into balls, were "employees”).
. Although the district court's interpretation of "economic dependence" may appear to be reasonable on the surface, it would lead to senseless results if carried to its logical conclusion. Consider the following example. Two persons do exactly the same work for the same organization. The first worker, who relies on the job as a primary source of income, would be considered "economically dependent” on the organization and thus an "employee” subject to the minimum-wage provisions of the FLSA. The other worker, whose spouse provides the primary source of family income, would not be considered “economically dependent” and thus would not necessarily be entitled to receive the minimum wage. Moreover, upon the first worker’s subsequent marriage to a spouse who would provide the primary source of family income, he or she might then lose the status as an "employee,” resulting in a possible reduction in wage rate.
. We recognize that the distributors performed home research work for DialAmerica in addition to their distribution work. We hold that, while performing home research for DialAmerica, these persons were "employees” under the FLSA and entitled to payment of the minimum wage.
. DialAmerica paid the distributors in a lump sum equal to one cent per card more than the piece rate times the number of completed cards returned by the distributor, regardless of whether the cards had been completed by the distributors or by one of their distributees. Initially, DialAmerica instructed the distributors to pay their distributees the going piece rate for each card completed and to keep the remaining one cent per card for themselves. Several years later, however, DialAmerica stopped giving instructions on how distributees were to be paid. Several distributors testified that they paid their distributees less than the going piece rate. One distributor testified that the rate he paid a distributee depended on the relative transportation expenses he incurred in delivering cards to and from that distributee.
. Transportation expenses could be significant for distributors who maintained a wide distribution area. One woman testified that she regularly traveled from her home in New Jersey to Long Island, New York, where some of her distributees lived.
. The Act expired by its own terms effective October 1, 1984. Equal Access to Justice Act, Pub.L. No, 96-481, § 204(c). Section 204(c) states, however, that the Act "shall continue to apply through final disposition of any action commenced before the date of repeal.” Id. Because this case was commenced before the date of repeal, the terms of the Act still apply.
. We defer to the district court’s finding that "there is complete congruence between the Department of Labor’s actions at the pre-trial and trial level.” See Donovan v. DialAmerica Marketing, Inc., Civil No. 81-4020, letter op. at 2 (D.N.J. Mar. 5, 1984).
. Because we reach the same conclusion as the district court, we need not resolve the issue left open by this court in Washington v. Heckler, 756 F.2d 959, 963 n.4 (3d Cir.1985). That decision did not determine the scope of review of the district court’s "substantially justified" conclusion in a case tried in the district court as opposed to a case in which the district court performs the same function as this court in reviewing an administrative record.