
    478 A.2d 456
    Anthony DEL TURCO and Rita M. Del Turco, Appellants, v. PEOPLES HOME SAVINGS ASSOCIATION Successor by Merger to Home Protection Savings and Loan Association, and Beaver Valley Intermediate Unit No. 27.
    Superior Court of Pennsylvania.
    Argued Jan. 24, 1984.
    Filed May 25, 1984.
    
      H. Klein, Aliquippa, for appellants.
    George A. Verlihay, Beaver Falls, for appellees.
    Before WIEAND, TAMILIA and POPOVICH, JJ.
   TAMILIA, Judge:

This appeal arises from an Order of the Court of Common Pleas of Beaver County, dated March 9, 1982, that sustained appellee’s preliminary objections and dismissed appellant’s complaint in assumpsit and trespass. The issues presented on appeal primarily concern the res judicata effect of a judgment suffered by appellants, Anthony and Rita Del Turco, in a mortgage foreclosure action brought by appellee, Peoples Home Savings and Loan Association, upon a subsequent suit brought by appellants against appellee. After thoroughly examining appellants’ arguments, we affirm.

On February 28, 1974, appellants obtained a loan of $475,000 from Peoples Home Savings and Loan Association [hereinafter Peoples Home] to finance the construction of an office building. Pursuant therewith, appellants executed a mortgage covering two parcels of land situated in Beaver County, Pennsylvania and a mortgage note in the amount of the loan. In May 1975, Peoples Home initiated a mortgage foreclosure action against appellants (No. 883 of 1975, Beaver County) since appellants had failed to make the monthly payments required by the terms of the mortgage and mortgage note. Appellants failed to respond to the complaint filed by Peoples Home. See Pa.R.C.P. 1141, 1148. On June 26, 1975, Peoples Home took a judgment against appellants in the amount of $537,784 and caused a writ of execution to be issued upon the subject realty. On August 15, 1975, the two parcels of land securing the loan obligation were sold at sheriffs sale and a schedule of distribution was made. Appellants neither took exception to the issuance of the writ of execution nor petitioned to set aside the sheriffs sale. See Pa.R.C.P. 3181, 3183(e), and 3132. On June 5, 1981, appellants caused to be filed a complaint in trespass and assumpsit against Peoples Home. Counts I-IV of the complaint set forth the following averments:

“COUNT I

“10......

“11. In December, 1974, there remained a $6,987.15 balance available from the proceeds of said $475,000 loan for purposes of paying obligations incurred by plaintiffs in connection with the construction of the office building mentioned above.

“12. At that time, plaintiffs requested defendant Home Pro to use said sum of $6,987.15 to pay Rawding Electric for certain necessary electrical work, and Home Pro, through its President, Earl F. Klear, promised to do so but subsequently failed and refused to do so despite repeated requests.

“13. Nor did defendant Home Pro ever credit plaintiffs’ mortgage loan account in said amount of $6,987.15 up to and including August 15, 1975, the date on which mortgage foreclosure proceedings on said $475,000 mortgage was completed.

“WHEREFORE, plaintiffs request that a judgment be entered in their favor and against defendant, Peoples Home Savings Association, in the amount of $6,987.15, together with interest from August 15, 1975.

“COUNT II

“14......

“15. For the period March 1, 1975 through August 15, 1975, defendant Home Pro, as mortgagee in possession, received rentals from tenants in plaintiffs’ premise totalling $21,938.93 but Home Pro credited only $11,733 to plaintiffs’ loan account.

“16. On or about May 27, 1975, defendant Home Pro received $5,000 from the other defendant herein, Intermediate Unit, for “excess electricity used”, under terms of the Lease between plaintiffs, as Lessor, and the Intermediate Unit as Tenant. A copy of said Lease is attached hereto, marked Exhibit “B” and made part hereof.

“17. Said Lease provides, in pertinent part, as follows:

“ ‘... It is understood and agreed that should the total cost for electrical power furnished to the premises exceed Three Thousand ($3,000.00) Dollars for the twelve (12) month period beginning with the anniversary date of Lessee’s taking possession, then Lessee shall reimburse Lessor in full for that amount by which the cost for electrical power exceeds Three Thousand ($3,000.00) Dollars for such twelve (12) month period____’

“18. Defendant Intermediate Unit took possession of the premises on March 1, 1974.

“19. Billing for electrical power used on said premises leased by the Intermediate Unit reached $3,000 on or about August 1, 1974 and reached $8,000 on or about November 15, 1975, all of which billings were paid to Duquesne Light Company by the plaintiffs.

“20. On or about May 3, 1975, defendant Home Pro charged plaintiffs’ loan account with $4,500 for electricity billed by Duquesne Light but said defendant paid only $3,500 to Duquesne Light for the credit of plaintiffs’ account.

“WHEREFORE, plaintiffs request that a judgment be entered in their favor and against defendant, Peoples Home Savings Association, in the amount of $16,205.53, together with interest from August 15, 1975.

“COUNT III

“21. The provision contained in said $475,000 Mortgage, dated February 28, 1974, calling for a charge against plaintiffs, as mortgagors, for an attorney’s commission of five per cent of the total indebtedness, in case of default and foreclosure, is unconscionable.

“22. The attorney’s commission charged against plaintiffs in the herein mentioned foreclosure proceedings was $25,-609, and was grossly excessive, unfair and unreasonable.

“23. An attorney’s commission of $2,560.90 would have been fair and reasonable compensation for the time, effort and responsibility involved in said foreclosure proceedings; and an attorney’s commission of $5,121.80 would have been a relatively princely sum for same.

“WHEREFORE, plaintiffs request that a judgment be entered in their favor and against defendant Peoples Home Savings Association, in the amount of $20,487.20, together with interest from August 15, 1975.

“COUNT IV

“24.....

“25. In the event that the plaintiffs’ mortgage loan account had been properly and timely credited with the items referred to in said preceding paragraphs, plaintiffs would have been able to timely cure any default and avoid foreclosure.

“26. After foreclosure proceedings were begun but before they were concluded, plaintiffs discussed with defendant Home Pro, in the person of the said Mr. Klear, its President, Chief Executive Officer and Chief Operating Officer, various proposals designed to avert foreclosure and permit plaintiffs to retain their equity in the herein premises, which then was a little more than $100,000.

“27. In July, 1975, plaintiffs called Mr. Klear and advised him that plaintiffs had a bona-fide prospective purchaser for said Lot No. 2, with office building erected thereon, for a price of $350,000, and asked if defendant Home Pro would release the lien of the mortgage on said lot if all of the proceeds of said sale were paid over to Home Pro. Mr. Klear said no on behalf of Home Pro, and further stated that Home Pro would release the lien only if Home Pro would receive $450,000.

“28. In July, 1975, the balance due on plaintiffs’ mortgage loan with Home Pro was approximately $500,000, according to the records of Home Pro.

“29. The fair market value of said Lot No. 3 with restaurant building erected thereon was $275,000 in July, 1975.

“30. Plaintiffs’ property, said Lots No. 2 and No. 3, were sold upon foreclosure by Home Pro for the amount due from plaintiffs, approximately $550,000, including interest, costs and attorney’s commission, although its fair market value was not less than $600,000 at that time.

“31. Home Pro thereupon loaned the purchaser $675,000, including $125,000 to complete the office building.

“32. The fair market value of Lot No. 2 with the unfinished office building thereon in July, 1975 was $325,000, and when completed its market value was not less than $450,-000.

“33. The purchaser from Home Pro resold the combined parcels on the open market, in a willing buyer, willing seller situation, on September 1, 1977, just two years after foreclosure, for $812,500.

“34. It is common practice among lending institutions in the Beaver County area and elsewhere, that when a mortgage covers two or more parcels of separate and distinct real estate, with improvements erected upon each, to release one parcel from the lien of the mortgage when the mortgagor wishes to sell it, provided that all of the proceeds of the sale or a portion of the proceeds, as determined by the lending institution, is paid over to the lending institution, and provided further, that the remaining parcel or parcels provides adequate security for the remaining balance which would then be due on the mortgage loan. “35. Defendant Home Pro, with malicious intent to do injury unto plaintiffs, and with callous disregard of the interests of plaintiffs, its steadfast, faithful customer for 27 consecutive years, refused to permit plaintiffs to sell one parcel as outlined in the preceding paragraph, although Home Pro would have been adequately protected if such a proposal had been approved.

“36. Said refusal was a malicious act on the part of Home Pro, unnecessary to protect the interests of Home Pro, and with the result of destroying plaintiffs financially and thereby wiping out a lifetime effort produced by plaintiffs’ sweat and tears.

“37. As a direct and proximate result of said actions of defendant Home Pro, plaintiffs lost their equity of $100,000 in said real estate, and suffered extreme mental anguish.

“WHEREFORE, plaintiffs request that a judgment be entered in their favor and against defendant, Peoples Home Savings Association, in the amount of $200,000 ($100,000 in compensatory damages, together with interest from August 15, 1975 and $100,000 in punitive damages.)”

Peoples Home responded to the complaint by filing preliminary objections in the nature of a demurrer to each count pleaded. On March 9, 1982, the lower court, finding that Counts I — III were barred by res judicata and Count IV by its failure to state a cause of action, sustained the preliminary objections and dismissed the complaint. Appellants’ petition for reconsideration was denied and this appeal followed.

Initially we note the appropriate standard of review, as expressed in Donnelly v. DeBourke, 280 Pa.Super. 486, 489, 421 A.2d 826, 828 (1980) (Citations omitted):

[W]hen considering preliminary objections in the nature of a demurrer, we accept as true all well-pleaded material facts in the complaint, as well as all inferences reasonably deducible therefrom. ... [Preliminary objections should be sustained and a complaint dismissed only in cases that are clear and free from doubt, i.e., it must appear with certainty that, upon the facts averred, the law will not permit recovery by the plaintiff.

Appellants first contend that the defense of res judicata was improperly raised in the form of preliminary objections rather than in a responsive pleading under “new matter” as required by Pa.R.C.P. 1030. It is settled principle that unless the complaint sets forth in detail, either directly or by reference, the essential facts and issues pleaded by the prior suit, the affirmative defense of res judicata must be raised in a responsive pleading under the heading of new matter and not by preliminary objection. Callery v. Blythe Township Municipal Authority, 432 Pa. 307, 243 A.2d 385 (1968); Kiely v. J.A. Cunningham Equipment Inc., 387 Pa. 598, 128 A.2d 759 (1957); Goodrich Amram 2d § 1017(b):11; See also Dunham v. Temple University of Commonwealth System of Higher Education, 288 Pa.Super. 522, 432 A.2d 993 (1981); Duquesne Slag Products Company v. Lench, 44 Pa.Commw. 385, 403 A.2d 1065 (1979), aff’d 490 Pa. 102, 415 A.2d 53 (1980). Where, as here, the complaint makes repeated references to the prior mortgage foreclosure action and contains facts and issues pleaded by the prior action, the affirmative defense of res judicata is properly raised by preliminary objections.

Finding as we do that the affirmative defense of res judicata was properly raised by way of preliminary objections, we next decide whether the lower court properly sustained Peoples Home’s defense of res judicata to the first three counts of appellants’ complaint.

In Martin v. Poole, 232 Pa.Super. 263, 268, 336 A.2d 363, 366 (1975) this court stated:

Res judicata literally means a matter adjudged or a thing judicially acted upon or decided. From long usage it has come to encompass generally the effect of one judgment upon a subsequent trial or proceeding. Two quite distinct aspects are included: first, the effect of a judgment in a subsequent action between the parties based upon the same cause of action; second, the effect on the parties in a trial on a different cause of action. (Citation omitted) (emphasis in original). The first effect is known as merger and bar, “technical” res judicata, or simply “res judicata”; the second is known as collateral estoppel.

For the doctrine of res judicata to apply, a concurrence of four conditions must be shown: (1) Identity in the things sued upon or for; (2) Identity of the cause of action; (3) Identity of persons and parties to the action; and (4) Identity of the quality or capacity of the parties suing or sued. Schubach v. Silver, 461 Pa. 366, 336 A.2d 328 (1975); Stevenson v. Silverman, 417 Pa. 187, 190, 208 A.2d 786, 787, 788 (1965), cert. denied 382 U.S. 833, 86 S.Ct. 76, 15 L.Ed.2d 76 (1965); Martin v. Poole, supra.

In the instant matter, it is not easily discernible whether the two actions constitute a single cause of action or two distinct causes of action arising out of a single transaction. Appellants insist upon the latter. In support thereof, they contend that res judicata does not bar the litigation of Counts I — III since Pa.R.C.P. 1148, governing counterclaims in foreclosure actions, does not make compulsory the assertion of a counterclaim arising out of the same transaction or occurrence from which the claim of Peoples Home arose. Absent a statute or rule of court, they continue, the failure to allege certain facts either as a counterclaim or set off in the mortgage foreclosure action does not preclude them from relying upon those facts in a subsequent action brought by them against Peoples Home. Appellants rely upon the case of Martin v. Poole, supra, in support of this proposition.

Martin v. Poole, supra, exposes the tension between res judicata theory and permissive counterclaim pleading practice in Pennsylvania. This tension is made particularly apparent by a situation in which a defendant in the first action, who was the plaintiff in the subsequent suit, fails to interpose a permissive counterclaim in the first action.

Martin, the appellant, initiated a trespass action against Poole, the appellee, for personal injuries allegedly suffered as a result of Poole’s negligence in an automobile accident involving the two. During the pendency of the suit, Poole commenced a separate trespass action against Martin, the case of Poole v. Martin. Martin did not contest this suit and a default judgment against him was taken by Poole. Subsequently, Poole moved for a summary judgment in the first action, Martin v. Poole, on the theory that the default judgment in the case of Poole v. Martin barred the litigation. The lower court granted the motion for summary judgment and Martin appealed to our court. We held that the trespass action initiated by Martin was not barred by res judicata since each suit was a different cause of action. We further held that the issue of Poole’s negligence was not determined by the principle of collateral estoppel since the default judgment taken against Martin by Poole did not actually litigate any negligence issue. In so holding, our court found that the factual situation before it was essentially identical to that stated in Illustration I to comment (b) to § 58 Restatement of Judgments, setting forth the following:

‘A brings an action against B for the negligent driving of an automobile by B resulting in a collision with an automobile driven by A. B fails to plead and judgment by default is given against him. B is not precluded from subsequently maintaining an action against A on the ground that the harm which he suffered was the result of A’s negligence.’ Martin v. Poole, supra, 232 Pa.Super. at 270, 336 A.2d at 367.

Presented with this factual situation, the court quoted with approval the general rule set forth in § 58, Restatement of Judgments pertaining to the effect of the failure to interpose a counterclaim:

‘[wjhere the defendant does not interpose a counterclaim although he is entitled to do so, he is not precluded thereby from subsequently maintaining an action against the plaintiff on the cause of action which could have been set up as a counterclaim.’ Martin v. Poole, supra, 232 Pa.Super. at 270, 336 A.2d at 367.

We could distinguish Martin v. Poole, supra, from the instant suit if we should find, as did the lower court, the requisite identity of cause of action present. In a fundamental way, the subject matter, issues, facts and evidence in the instant suit are so inextricably interwoven with that of the first suit that further judicial consideration would be the relitigation of the same controversy. However, we are persuaded that the situation before us is governed by Restatement (Second) of Judgments § 22 (1980), which is the progeny of § 58, Restatement of Judgments relied upon by our court in Martin v. Poole, supra. This section provides:

(1) Where the defendant may interpose a claim as a counterclaim but he fails to do so, he is not thereby precluded from subsequently maintaining an action on that claim, except as stated in Subsection (2).
(2) A defendant who may interpose a claim as a counterclaim in an action but fails to do so is precluded, after the rendition of judgment in that action, from maintaining an action on the claim if:
(a) The counterclaim is required to be interposed by a compulsory counterclaim statute or rule of court, or
(b) The relationship between the counterclaim and the plaintiffs claim is such that successful prosecution of the second action would nullify the initial judgment or would impair rights established in the initial action.

Subsection (2)(b) encompasses the situation where, as here, two claims have such a measure of identity and are so inextricably intertwined that a different judgment in the second action would operate to nullify or substantially impair rights or interests established by the judgment in the first.

In the instant matter, appellants present a restitutionary theory of recovery that, in essence, challenges the amount of debt paid Peoples Home pursuant to judgment in the mortgage foreclosure action. In Counts I, II, recovery of sums allegedly neither paid by Peoples Home to Rawding Electric nor properly credited to appellants’ mortgage loan account is sought. In Count III, recovery of an amount in excess of what appellants allege to have been the reasonable value of attorney’s services rendered in the mortgage foreclosure action is demanded. Clearly, the litigation of these counts, if successful, would operate to undermine the initial judgment of Peoples Home. See Restatement (Second) of Judgments § 58, Comment F, Illustration 9, 10 (1980); See also, In Re Estate of Banes, 479 Pa. 264, 388 A.2d 319 (1978) (per curiam, equally divided court). Therefore, we conclude that the preservation of the integrity of judgments and the principle of finality underpinning res judicata theory requires preclusion from judicial consideration the averments set forth in Counts I-III. Appellants had full opportunity to make these claims in the mortgage foreclosure action but failed to do so. As such, the preliminary objections to Counts I — III were properly sustained by the lower court.

Appellants’ last contention is that the lower court erred in sustaining Peoples Home’s preliminary objection to Count IV. Appellants allege that in July of 1975, subsequent to their default under the terms of the mortgage agreement, a purchaser for one of the two parcels of land covered by the subject mortgage had been secured by them. They further allege that Peoples Home maliciously failed to follow common banking practice of releasing one of the parcels of realty from the lien of the mortgage so that they could sell it to their purchaser. We concur with the lower court that on its face the paragraphs contained in Count IV do not state a legally cognizable claim against Peoples Home. No allegation of legal duty, breach, causation and injury in fact are set forth therein. With respect to the latter, the injury alleged is based only on speculation and not on events that actually transpired. In addition, the mortgage instrument does not require the mortgagee to release a parcel of land from the lien of the mortgage upon demand by the mortgagor.

Appellants argue, however, that Peoples Home acted fraudulently in the mortgage foreclosure sale of the subject property. Though they acknowledge that their complaint is deficient in setting forth such an allegation, they urge that any pleading inadequacy could have been cured by amendment. Appellants premise this argument upon their discovery, after default and sale of realty, that the subject realty had been sold by Peoples Home to the purchaser with whom they had been dealing. This was alleged in appellants’ brief in opposition to the preliminary objections of Peoples Home and in their petition for reconsideration. Consequently, appellants contend, the lower court abused its discretion by denying them leave to amend.

It is true that appellants failed to exercise their right to amend their pleading within the ten-day period prescribed by Pa.R.C.P. 1028(c). Nevertheless, where it is apparent that a pleading can be cured by amendment, the lower court may not sustain a demurrer that would put an end to a controversy without giving the pleader an opportunity to file an amended complaint, if there exists a reasonable possibility that a cause of action may be sustained. Otto v. American Mutual Insurance Company, 482 Pa. 202, 393 A.2d 450 (1970); Dietrich Industries, Inc. v. Abrams, 309 Pa.Super. 202, 455 A.2d 119 (1982); Harley Davidson Motor Company, Inc. v. Hartman, 296 Pa.Super. 37, 442 A.2d 284 (1982); Framlau Corporation v. County of Delaware, 223 Pa.Super. 272, 299 A.2d 335 (1972). Though the right to amend a pleading is to be construed liberally, amendment will not be permitted after the running of the statute of limitations if it introduces a new cause of action. Laursen v. General Hospital of Monroe County, 494 Pa. 238, 431 A.2d 237 (1981); Kuisis v. Baldwin-Lima-Hamilton Corporation, 457 Pa. 321, 319 A.2d 914 (1974); Daley v. John Wanamaker, Inc., 317 Pa.Super. 348, 464 A.2d 355 (1983); Stulz v. Boswell, 307 Pa.Super. 515, 453 A.2d 1006 (1982); Sanchez v. City of Philadelphia, 302 Pa.Super. 184, 448 A.2d 588 (1982); Junk v. East End Fire Department, 262 Pa.Super. 473, 396 A.2d 1269 (1978). The purpose of this rule is to prevent prejudice to the adverse party. Daley v. John Wanamaker, Inc., supra; Junk v. East End Fire Department, supra.

As stated in Junk v. East End Fire Department, supra, 262 Pa.Super. at 490-491, 396 A.2d at 1277:

... [A] new cause of action does not exist if plaintiffs amendment merely adds to or amplifies the original complaint or if the original complaint states a cause of action showing that the plaintiff has a legal right to recover what is claimed in the subsequent complaint. Wilson v. Howard Johnson Restaurant, 421 Pa. 455, 460, 219 A.2d 676, 678-79 (1966); Arner v. Sokol, 373 Pa. 587, 591, 96 A.2d 854, 855-56 (1953); 3 Standard Pennsylvania Practice 682. A new cause of action does arise, however, if the amendment proposes a different theory or a different kind of negligence than the one previously raised or if the operative facts supporting the claim are changed. 2B Anderson Pennsylvania Civil Practice, 66 1033.28 and 1033.31.

Here, a new cause of action does arise subsequent to the running of the statute of limitations since an amendment setting forth fraud in the judicial sale would propose a different theory of recovery, and would introduce operative facts not mentioned in the original pleading. Accordingly, the lower court did not abuse its discretion by denying leave to amend.

Having found that the lower court properly sustained the preliminary objections of Peoples Home to all counts contained in appellants’ complaint, we affirm the lower court order of March 9, 1982.

Order affirmed. 
      
      . Peoples Home Savings and Loan Association is the successor entity to a merger in 1980 of Peoples Home Savings and Loan Association and Home Protection Savings and Loan Association.
     
      
      . Appellants also joined Beaver Valley Intermediate Unit No. 27, named in the caption of this appeal, in a separate count in its complaint. By its paragraph 39, appellants sought recovery of payments made by Beaver Valley to Peoples Home, as mortgagee in possession, for excess electricity used. We note that the judgment and order appealed from to our court, and the issues raised in the instant appeal, pertain only to Peoples Home. The record before us indicates that Beaver Valley responded to appellants' complaint by filing an answer.
     
      
      . Pa.R.C.P. 1148 provides that in an action of mortgage foreclosure:
      A defendant may plead a counterclaim which arises from the same transaction or occurrence or series of transactions or occurrences from which the plaintiffs cause of action arose. Goodrich-Amram states:
      It [Rule 1148] restricts every defendant to claims which arise from the same transaction or occurrence or series of transactions or occurrences from which the plaintiffs cause of action arose ... No defendant may now set off a claim against the plaintiff simply because its nature is contractual or quasicontractual, as allowed in assumpsit actions.
      The claim must now arise, in some manner, from the mortgage relationship. A counterclaim could be filed, for example, for damages for breach of warranty of title to the mortgaged premises. [Cf. Wacker v. Straub, 88 Pa. 32 (1878).] Also, it has been held that defendant may counterclaim for the balance due from plaintiff on a construction contract in connection with which the mortgage was given. [Genel v. Vacca, 39 Del.Co.Rep. 191 (1952)]. On the other hand, a counterclaim could not be filed for professional services rendered by the mortgagor to the mortgagee, at least if unrelated to the mortgage. [Cf. Bechtel v. Green, 17 Berks Co.L.J. 41 (1924).] 3 Goodrich-Amram 2d, § 1148:1, p. 488.
      In Mellon Bank N.A. v. Joseph et ux., 267 Pa.Super. 307, 317, 406 A.2d 1055, 1060 (1979), a panel of our court affirmed an order striking a counterclaim in an action of mortgage foreclosure because the allegations in the counterclaims "were not part of, or incident to, the creation of the mortgage itself.” Accord, Warden v. Zanella, 283 Pa.Super. 137, 423 A.2d 1026 (1980); Federal Land Bank of Baltimore v. Fetner, 269 Pa.Super. 455, 410 A.2d 344 (1980). Appellants neither contend nor could they contend that their claims are not incident to the creation of the mortgage itself.
     
      
      . See also, Sobol v. Will Allen Builders, Inc., 244 Pa.Super. 486, 368 A.2d 825 (1976).
     
      
      . We also stated, as dictum:
      Finally, even assuming arguendo that the two suits did involve the same cause of action, it was appellee, rather than appellant, who was guilty of splitting a cause of action by bringing a separate suit in the same Common Pleas court, rather than interposing a counterclaim in the original suit as allowed under Rule 1046. Martin v. Poole, supra, 232 Pa.Super. at 270, 336 A.2d at 367.
      We note that the concern regarding splitting a cause of action in its usual context refers to a situation where a valid and final judgment in favor of a plaintiff extinguishes that plaintiffs right, pursuant to bar and merger, to maintain a second action against a defendant based upon the same transaction. Restatement (Second) of Judgments § 24 (1980). In Martin v. Poole, supra, it was Poole, the defendant in the first action, who was the plaintiff in the second action, that “split” the cause of action by failing to interpose a permissive counterclaim in the first action. In the instant matter, appellants, likewise, failed to interpose a permissive counterclaim to the mortgage foreclosure action.
     
      
      . Even if we were to characterize appellants' claims as defenses to the mortgage foreclosure action, appellants would be precluded from attacking the judgment collaterally. The law provides adequate remedies for obtaining direct relief for defective default judgments and appellants failed to avail themselves of the opportunity. See Roberts v. Gibson, 214 Pa.Super. 220, 251 A.2d 799 (1969).
     
      
      . At the time of the instant suit, a six-year statute of limitations governed actions to set aside a judicial sale of property. Act of July 9, 1976, P.L. 586, No. 142, Sec. 2, 42 Pa.C.S.A., Sec. 5527. The limitation period had expired by the time appellants requested leave to amend on March 17, 1982.
      Commencement of this action is now governed by 42 Pa.C.S.A. § 5522(b)(5).
     