Ten years ago, Northern Virginian Tom J. Billman figured out a new way to make money in real estate.

His system combined speculation on the price of houses -- a no-lose proposition in the 1970s -- innovative tax shelters and creative financing.

The plan was to organize groups of investors to buy unsold houses from home builders and rent them out. The builders would get badly needed cash, the investors would get huge tax deductions plus potential profits and Billman would make money all the way around by putting the deals together and arranging financing.

The individual pieces of his system weren't unique, but the combination was. And while it worked, it made money for everybody.

But now, $1.5 billion and 20,000 houses later, Billman's system and the family of companies it spawned are in trouble. Its centerpiece company, Equity Programs Investment Corp. (EPIC), is behind on payments on some of its mortgage debt, which totals $1.3 billion. Community Savings and Loan, which is owned by the same holding company as EPIC, was hit by a run and has been shut down by an executive order halting withdrawals for 20 days. Community's offices are scheduled to reopen Thursday.

How did the EPIC system work, and where did it go wrong?

EPIC officials have refused to answer most inquiries from the press recently, but interviews with housing industry experts, former EPIC officials, investors and people who did business with the company make it possible to piece together an outline of the EPIC strategy and the sources of its problems.

EPIC began as a program to buy model homes from builders and lease them back to the builders. Models are the finished, furnished houses builders show to potential buyers. Builders need them to attract buyers, but models tie up the builders' cash for years, because they ordinarily are the last houses sold in a project.

EPIC solved that. It set up investment partnerships to buy the models, giving the builders cash while allowing them, through the leaseback, to keep using the houses. Investors got to deduct all the cost of buying, financing and maintaining the house from their other income, plus the opportunity to earn profits taxed at favorable long-term capital gains rates when the model was ultimately sold.

But the model program was limited because there aren't that many model homes. In the early 1980s, EPIC branched out into investing not only in models but also in other newly built houses that developers couldn't sell.

"That's when it really took off," one former EPIC official said yesterday. The EPIC boom was fueled by the combination of new federal laws that improved real estate tax benefits and a slump in the housing market that left builders with unsold houses that they were eager to have EPIC take off their hands.

At the same time, the secondary mortgage market -- through which investors buy mortgage loans or securities based on mortgages -- was coming into its own. EPIC took full advantage of this as well.

As it expanded, the EPIC system worked like this:

*EPIC would set up limited partnerships -- with itself as general partner -- while scouting around for property for these partnerships to buy. Finding houses and forming partnerships went on simultaneously, those familiar with the company say. When property acquisitions got ahead of partnership formations, property was sometimes held until a partnership could be set up to buy it.

*Groups of houses were then conveyed to the partnerships. The number per partnership varied; prospectuses for several partnerships showed each owned about 20 houses.

*These sales were financed by mortgage loans through EPIC Mortgage, a mortgage-banking affiliate of EPIC.

*EPIC, working through financial advisers and later through stockbrokers, recruited investors to buy limited partnership interests. A typical partnership would consist of a general partnership "unit" and 20 to 25 limited partnership "units." The limited partnership units would typically sell for $25,000 apiece, though an investor would not have to put up the full amount all at once. He or she would be allowed to sign a note and pay the money in quarterly payments.

*The partnership would own the houses, and an EPIC-affiliated property management company managed them as rental property. Rental income would go toward mortgage payments and other costs, but, according to former company officials, the rents were rarely adequate to cover the mortgage payments and other costs. EPIC made up these cash deficits by loaning money to the limited partnerships.

*After a predetermined term, usually four years, the partnership was supposed to "mature," then the houses would be sold and profits distributed to the partners.

Meanwhile, EPIC Mortgage was financing the millions of dollars worth of home purchases. It either sold the loans directly to investors or pooled them and issued mortgage-backed securities based on them. Mortgage-backed securities entitle their owners to shares of the payments made by borrowers of the mortgages in the pool.

By selling the loans or the mortgage-backed securities, EPIC Mortgage was able to recover its money so it could make new loans and keep expanding the business.

Selling the loans and securities was made easier because EPIC was able to obtain mortgage insurance for the loans themselves and for the pools. The insurance made institutions willing to buy, but, as it has turned out, exposed the mortgage insurance companies to significant risks.

Moody's Investors Service said yesterday it has placed one of EPIC's insurers, Ticor Mortgage Insurance Co. of Los Angeles, under review for possible downgrading of its credit rating. "Given Ticor's involvement in the EPIC program, the insurer may suffer extraordinary losses relative to its capital if the EPIC situation is not corrected in timely fashion," Moody's said.

A key to EPIC's initial success was its ability to buy houses at below-market prices. The bad real estate markets of 1980-82 made many builders willing to sell their inventory at big discounts from the usual asking price and in some cases to pay EPIC a 7 percent fee to buy the houses.

At the same time, EPIC was able to get mortgages from EPIC Mortgage for 95 percent of the appraised value of the houses it was buying. Because EPIC was buying the houses at discounts of more than 5 percent, EPIC was able to take home cash on each transaction.

"Each time they bought a house they made money," said one person familiar with the procedure. This "allowed EPIC to start out cash-positive, which really drove the whole machine.

"You buy a house and you get cash, so all you have to do is keep buying," this source added.

The cash was critical, this person said, because rents sometimes were too low to pay the mortgages and management costs. EPIC could lend its spare cash to the partnerships to cover the shortfall and then collect its money -- plus interest -- when the property was sold.

Clayton C. McCuistion, president of Community Savings & Loan Association, said over the weekend that this was not the case. He said that EPIC rarely ran at a cash deficit and usually showed a surplus.

Community's offices were closed yesterday, and McCuistion and EPIC officials did not return telephone calls.

However, three people formerly affiliated with EPIC said that deficits were chronic.

The cash put up by investors in the partnerships and the excess cash generated from "overmortgaging" the properties, according to the sources, allowed the company to continue growing, and all would have been well if house prices had appreciated as they did in the 1970s.

But they didn't.

Several sources said that EPIC began to have trouble selling its houses when the term of the partnerships expired and the investors wanted their money back.

Unable to sell the homes to people who wanted to live in them and unable to rent them for enough cash to cover mortgage payments, EPIC began trying to resell the properties to new investors. When EPIC rolled over a batch of houses to new investors, however, it could not get a discount from the purchase price and thus could not take any cash out of the deal.

At the same time, the real estate market and the economy had improved to the point where builders could sell their inventory to ordinary home buyers, and thus were less inclined to give EPIC the sort of discounts and fees it needed.

Third, impending tax law changes made it more difficult to sell real estate investments.

One source said that EPIC, in order to improve the marketability of its limited partnerships, began subdividing them so that "one group of investors would get the lion's share of the losses" for a very short time -- six to nine months, one source said. This source said the short-term tax-shelter plan was very successful, but exacerbated the renewal problem because new investors had to be recruited every six to nine months instead of every four years. "Everybody was watching the bomb tick," he said.

Then came the Maryland savings and loan crisis and the state requirement that every state-insured S&L obtain federal insurance. Federal regulators have said Community must sever its connections with EPIC if it is to obtain federal coverage.

EPIC has halted sales of partnerships while it attempts to find a buyer for the company and has said that "negotiations are progressing with a number of interested parties." It also said that it expects to complete the sale "or other arrangements" before lenders foreclose on the overdue loans.

It says the value of the 20,000 homes is $1.5 billion, compared with the $1.3 billion in mortgage debt, indicating the company has a $200 million surplus.

Asked over the weekend if EPIC would collapse, McCuistion expressed confidence.

"There's always a chance that any company will get into a situation it can't survive," he said, " . . . but we don't think it's a very likely possibility" for EPIC.