
338 N.W.2d 601 (1983)
215 Neb. 299
CHURCH OF THE HOLY SPIRIT, a Nebraska corporation, Appellee,
v.
BEVCO, INC., a Nebraska corporation, Defendant and Third-Party Plaintiff, and
Fidelity and Deposit Company of Maryland, a corporation, Appellants and Cross-Appellees,
Universal Terrazzo & Tile Co., Third-Party Defendant and Cross-Appellant.
No. 82-534.
Supreme Court of Nebraska.
September 23, 1983.
*603 Robert J. Becker and Jean A. Mahon-Pettit of Swarr, May, Smith, Andersen & Jensen, Omaha, for Fidelity & Deposit Co. of Md.
Carpenter, Fitzgerald & Coe, P.C., Omaha, for Church.
John F. Thomas of McGrath, North, O'Malley & Kratz, P.C., Omaha, for Universal.
KRIVOSHA, C.J., and BOSLAUGH, McCOWN, WHITE, HASTINGS, CAPORALE, and SHANAHAN, JJ.
SHANAHAN, Justice.
The Church of the Holy Spirit (Church) sued its contractor, Bevco, Inc. (Bevco), and Bevco's bonding company, Fidelity and Deposit Company of Maryland (Fidelity), for damages from breach of a construction contract and performance bond, i.e., faulty painting of the Church's parish center. Bevco filed a third-party action against its subcontractor, Universal Terrazzo & Tile Co. (Universal), which had painted the building's exterior. Bevco counterclaimed against the Church for payment of services rendered under the contract. Universal counterclaimed against Bevco for payment of services rendered under the subcontract. We affirm in part, reverse in part, and remand with directions.
In 1976 the Church entered a written contract with Bevco for construction of a parish center. Bevco subcontracted the exterior painting to Universal for $6,276. This written contract between Bevco and Universal contained: "X. To be bound to the Contractor by the terms of the general conditions of the specifications and addenda, and to conform to and comply with the drawings and specifications and addenda, and to assume toward the Contractor all the obligations and responsibilities that the Contractor assumes in and by the aforesaid documents toward the Owner, in so far as they are applicable to this particular sub-contract"; "XIV. To guarantee his work against all defects of materials or workmanship, as called for in the plans, specifications and addenda, or if no guarantee is called for, then for a period of one year from the date of completion of the work covered by this agreement"; and "Payment to the Subcontractor shall be made propmtly [sic] after the Contractor is paid by the owner."
John Tilly, architect for the Church, inspected the work of the contractors. Between November 11 and December 16, 1977, Universal applied the initial exterior coating of Desco Tonecrete. According to manufacturer's specifications, Desco Tonecrete should be applied and allowed to cure at a minimum temperature of 40° Fahrenheit and the backing of such application should have a maximum of 16-percent moisture content. Universal painted on some days when the temperature was less than 40 ° Fahrenheit and on other days when it rained or snowed. On December 13 Tilly discovered that Universal was applying the incorrect color of paint and ordered the painting stopped. It was too late in the year to repaint, and the building's expansion control joints remained open during the winter.
The Church selected another color of paint in May 1978. Universal finished applying the new paint in August, and later in August Tilly rejected Universal's work because there were "color variations" and "bleached-out" areas. To prevent the paint's cracking around expansion control joints, Tilly ordered removal of caulking from those joints in October. In November the Church selected transparent sealer, which Universal later applied in May 1979. Because Universal's application of the sealer was not uniform, Tilly rejected that work. In the fall of 1979 Universal said it would not correct the exterior sealer-coating. Between the fall of 1979 and January 1980 the exterior paint peeled and deteriorated. Such condition has never been corrected.
*604 In January 1981 the Church sued Bevco and alleged Bevco's breach of contract consisted of "improper exterior wall coating and caulking resulting in lack of uniformity in color, thickness and texture, discoloration, cracking, peeling ...." Bevco responded by filing an answer admitting the construction contract but generally denying any breach of contract. With its answer Bevco filed a counterclaim against the Church, seeking $16,750 in payment for services rendered under the contract. Bevco then filed a third-party action against Universal, alleging the provisions of paragraphs X and XIV of the subcontract, and further alleging that Universal was liable for any faulty painting. In the third-party action Universal filed an answer containing only a general denial, and also filed a counterclaim against Bevco for payment under the subcontract in the amount of $6,276. Neither Bevco nor Universal raised any affirmative defense regarding the Church's claim for faulty painting.
Tilly, the architect, testified that he did not know the cause of the paint's peeling. The Church also called an expert witness, painter Leroy Gustafson, who testified that the cost of correcting the condition of the painting was $29,117. Gustafson further testified that moisture entering the uncaulked expansion joints could have caused the poor condition of the painting. At the conclusion of the Church's case Bevco and Universal separately moved to dismiss the Church's claim for faulty workmanship. These motions were overruled.
Bevco called a witness who testified that Universal initially applied the paint when temperatures were below and moisture levels were above the manufacturer's specifications. According to Bevco's witness, Universal's failure to comply with the manufacturer's specifications caused the paint to peel. On account of such condition the Church did not accept the painting and did not pay Bevco. At the conclusion of Bevco's case Universal moved for a directed verdict on Bevco's third-party complaint because Bevco had not paid for the subcontracted painting. The trial court overruled the motion.
During Universal's case in chief, witnesses described the manner of application and the subsequent condition of the paint on the parish center. Universal introduced the manufacturer's written instructions for application of the paint used. At the close of all the evidence Universal again asked dismissal of Bevco's third-party complaint. The trial court overruled Universal's motion regarding Bevco. Then both Bevco and Universal renewed their motions to dismiss the Church's action. The trial court overruled these motions.
The trial court instructed the jury: "Before third-party plaintiff Bevco, Inc. can recover on its Third-Party Petition against third-party defendant Universal Terrazzo and Tile Co., it must first be determined by the jury that the plaintiff is entitled to recover against Bevco, Inc.," and that Bevco must prove the "amount of damages sustained by Bevco" as a result of any breach of the subcontract by Universal. The court further instructed: "If you find for Bevco on its Third-Party Petition against Universal, it will be your duty to award such damages as will fairly and reasonably, but not excessively, compensate Bevco for damages which it has sustained. The measure of damages is the amount of recovery that is awarded to plaintiff in its Petition against the defendant Bevco for the failure to properly apply the wall covering, if in fact you find such amount is owing." Bevco had requested and the court refused an instruction which included: "[I]f you find that the damages suffered by the Church were caused by the work performed by Universal ... then you must find Universal liable to Bevco for such damage."
During the course of deliberations, the jury asked additional instruction regarding the third-party action, namely, if the jury found in favor of the Church against Bevco, would such finding "have a bearing on how we are to go" in disposing of Bevco's third-party complaint against Universal? The trial court responded: "This is a question which must be determined by you in light of all the instructions," and no further instruction *605 was given to the jury. The jury returned a verdict in favor of Bevco on its third-party complaint and assessed damages at "$0." The trial court told the jury that the verdict for Bevco on the third-party complaint was "no verdict at all" and "that if [the jury] finds for Bevco, Inc. on its Third-Party Petition [sic], it must assess Bevco's damages." After further deliberations the jury returned a verdict for Bevco against Universal in the amount of $500. The jury also returned verdicts in favor of the Church against Bevco in the amount of $29,117, for Bevco against the Church in the amount of $16,750, and for Universal against Bevco in the amount of $6,276.
Post-trial motions were filed. On account of the performance bond, the Church requested an attorney fee of $12,091.25 pursuant to Neb.Rev.Stat. § 44-359 (Reissue 1978). The court allowed an attorney fee of $7,500 as a part of the costs to be paid by Fidelity. Bevco asked the trial court to increase Bevco's judgment against Universal from $500 to $29,117 or grant a new trial on the issue of damages in the third-party action. The trial court set aside the verdict of $500, as requested by Bevco, and granted a new trial in the third-party action on the question of damages. Bevco also requested prejudgment interest on the amount awarded on its counterclaim against the Church, but this request was denied. The Church's judgment against Fidelity was reduced to $12,367, that is, the difference between the damages awarded the Church and the amount awarded Bevco on its counterclaim against the Church.
Bevco assigns as errors of the trial court (1) the refusal to increase Bevco's verdict against Universal from $500 to $29,117 and (2) the disallowance of prejudgment interest on Bevco's counterclaim.
Fidelity claims error in the amount of the attorney fee allowed by the trial court.
Universal contends the trial court erred by (1) failing to sustain (a) Universal's motion to dismiss at the end of the Church's case and (b) Universal's additional motion for dismissal at the conclusion of all the evidence; (2) failing to sustain the motion for a directed verdict against Bevco because Bevco had not paid Universal for work under the subcontract; and (3) granting a new trial to Bevco on the issue of damages sought in the third-party action.
Confusion existed at trial regarding disposition of the third-party action. Therefore, it is necessary to review the nature and function of a third-party action pursuant to Neb.Rev.Stat. § 25-331 (Reissue 1979).
Section 25-331 is patterned on Rule 14 of the Federal Rules of Civil Procedure. See, Statement on Legislative Bill 763, Committee on Judiciary, 77th Leg. (Feb. 27, 1967); Minutes, Committee on Judiciary L.B. 763, 77th Leg. (Feb. 27, 1967). "The general purpose of Rule 14 is to avoid two actions which should be tried together to save the time and cost of a reduplication of evidence, to obtain consistent results from identical or similar evidence, and to do away with the serious handicap to a defendant of a time difference between a judgment against him, and a judgment in his favor against the third-party defendant." 3 J. Moore, Moore's Federal Practice ¶ 14.04 at 14-26 (2d ed. 1983). Also, "A third-party claim may be asserted ... only when third party's liability is in some way dependent on the outcome of the main claim or when the third party is secondarily liable to defendant." 6 C. Wright & A. Miller, Federal Practice and Procedure: Civil § 1446 at 246 (1971).
Availability and proper use of third-party practice was described in United States v. Joe Grasso & Son, Inc., 380 F.2d 749, 751-52 (5th Cir.1967), as "only in cases where the third party's liability was in some way derivative of the outcome of the main claim. In most such cases it has been held that for impleader to be available the third party defendant must be `liable secondarily to the original defendant in the event that the latter is held liable to the plaintiff.' ... Stating the same principle in different words, other authorities declare that the third party must necessarily be liable over to the defendant for all or part of the plaintiff's recovery ... or that the defendant *606 must attempt to pass on to the third party all or part of the liability asserted against the defendant .... Whichever expression is preferred, it is clear that impleader under Rule 14 requires that the liability of the third party be dependent upon the outcome of the main claim." (Citations omitted.) See Index Fund, Inc. v. Hagopian, 417 F.Supp. 738 (S.D.N.Y.1976).
The policy underlying third-party practice is to avoid circuity of actions and multiplicity of suits, as well as to expedite the resolution of secondary actions arising out of or as a consequence of the same facts involved in the action originally instituted. See Colton v. Swain, 527 F.2d 296 (7th Cir.1975). The basic function of third-party practice is the original defendant's seeking to transfer to the third-party defendant the liability asserted by the original plaintiff. See Tower Mtg. Corp. v. Reynolds, 81 F.R.D. 560 (W.D.Okl.1978). Third-party practice should reduce litigation by "having one lawsuit do the work of two." Falls Industries, Inc. v. Consolidated Chem. Indus., Inc., 258 F.2d 277, 283 (5th Cir.1958).
In this case the Church claimed faulty painting. In the subcontract Universal indemnified Bevco, viz, Universal assumed "toward [Bevco] all the obligations and responsibilities that the Contractor assumes... toward the [Church]." Because Bevco could be liable, and according to the jury was liable, to the Church, an attempt to transfer such liability to Universal was permissible under § 25-331.
A third-party defendant can be bound by the adjudication of the main claim. See, 3 J. Moore, supra at ¶ 14.13; Council Brothers, Inc. v. Ray Burner Company, 473 F.2d 400 (5th Cir.1973). Where the third-party plaintiff's claim against the third-party defendant is an outgrowth of the same facts which will determine the main or original claim of the initial plaintiff, the rights of all three parties are focused on a common, factual setting. In the interest of economyto the parties, court, counsel, and witnesses, as well as the pocketbook in view of the increasing costs of litigationa final disposition of all claims from such common source should be resolved as far as practicable in one action. See Powell, Inc. v. Abney, 83 F.R.D. 482 (S.D.Tex.1979).
As stated in Caputo v. U.S. Lines Company, 311 F.2d 413, 416 (2nd Cir.1963), an objective of third-party practice is "to make the evidence adduced by the plaintiff against the defendant available as a basis for the claim of the third-party plaintiff against the third-party defendant. Inconsistent determinations based upon the same evidence at the same trial are logically impossible. The court must follow the verdict of the jury." See, also, Knell v. Feltman, 174 F.2d 662 (D.C.Cir.1949).
Neither Bevco nor Universal raised any affirmative defense regarding any aspect of the entire proceedings. Apart from Bevco's counterclaim against the Church, the only question for the jury regarding the main claim was whether improper application of the paint caused the peeling condition. The jury found that damages were caused by Universal's faulty painting. Although the jury awarded damages to the Church, the trial court's instruction regarding the third-party action confused the jury. The jury awarded Bevco an amount different from the damages awarded to the Church, so that there were inconsistent verdicts. To conclude the question of responsibility for payment of damages caused by the faulty painting, the trial court should have instructed in substance: If there was a verdict for the Church, the jury also must return a verdict in favor of Bevco against Universal in the same amount awarded in the Church-Bevco verdict. Bevco's post-trial motion would have corrected the inconsistent verdicts. The District Court erred in overruling Bevco's motion in that regard.
Bevco contends that it is entitled to prejudgment interest on the amount awarded on its counterclaim against the Church. Prejudgment interest on a contract claim is allowed under Neb.Rev.Stat. § 45-104 (Reissue 1978), where the amount is liquidated. A claim is liquidated if the evidence furnishes data which, if believed, *607 makes it possible to compute the amount with exactness, without reliance upon opinion or discretion. Classen v. Becton, Dickinson & Co., 214 Neb. 543, 334 N.W.2d 644 (1983). Where a reasonable controversy exists as to the plaintiff's right to recover or as to the amount of the recovery, the claim is generally considered to be unliquidated and prejudgment interest is not allowed. Classen v. Becton, Dickinson & Co., supra; Holt County Co-op Ass'n v. Corkle's, Inc., 214 Neb. 762, 336 N.W.2d 312 (1983). The poor quality of the painting raised the question whether Bevco could recover any amount from the Church. In view of the faulty paintinga breach of contractBevco requested and received an instruction on substantial performance in order to prevail on its counterclaim against the Church. Any possibility of recovery by Bevco depended on the jury's answer to the question, Had Bevco substantially performed its contract with the Church? A reasonable controversy existed regarding the nature and degree of performance by Bevco, and, therefore, the claim was not liquidated. The trial court was correct in denying prejudgment interest on Bevco's counterclaim.
Addressing Fidelity's assignment of error regarding the attorney fee awarded by the trial court, Fidelity believes the attorney fee of $7,500 is excessive, because Fidelity should not have to bear an award of an attorney fee attributable in part to the Church's defense against Bevco's counterclaim. On several occasions we have indicated the factors considered by a court in determining a reasonable attorney fee. See, Stephens v. Allied Mut. Ins. Co., 182 Neb. 562, 156 N.W.2d 133 (1968); Schmer v. Hawkeye-Security Ins. Co., 194 Neb. 94, 230 N.W.2d 216 (1975); Herrera v. American Standard Ins. Co., 203 Neb. 477, 279 N.W.2d 140 (1979). A bonding company's exposure to liability, anticipated or actual, is not among the factors considered by a court in determining the amount of an attorney fee to be awarded in an action on a bond. The possibility that an attorney fee will be substantial in comparison with potential liability "is simply one of the factors the parties have to consider in determining whether to litigate a claim or attempt to settle it." See Graff v. Farmers Mut. Home Ins. Co., 211 Neb. 13, 21, 317 N.W.2d 741, 745 (1982). The trial court did not abuse discretion regarding the attorney fee awarded as a part of the costs taxed to Fidelity.
Universal complains that the trial court should have dismissed the third-party complaint of Bevco, because Bevco had not paid Universal the subcontracted compensation of $6,276. The agreement between Bevco and Universal expressly provided that Universal was entitled to be paid after Bevco was paid by the Church. In turn, the Church was obligated to pay Bevco upon acceptance of the work. Further, Universal did not raise any affirmative defense, such as Bevco's nonperformance of the subcontract. An affirmative defense must be pleaded in a contract action, and a general denial is not sufficient to raise any affirmative defense. Morearty v. City of McCook, 119 Neb. 202, 228 N.W. 367 (1929); Peters v. Wilks, 151 Neb. 861, 39 N.W.2d 793 (1949). The clear implication of the pleadings is that Bevco performed the subcontract as far as possible but that Universal's faulty workmanship prevented performance of the subcontract. As stated in Rickertsen v. Carskadon, 172 Neb. 46, 50, 108 N.W.2d 392, 396 (1961): "If there is a substantial performance, the action may be maintained but without prejudice to any showing of damages on the part of defendant for the failure to receive full and complete performance." Proper performance of the subcontract would have produced payment for the painting. It is untenable that Universal be permitted to use its faulty workmanship to defeat enforcement of the subcontract in which Universal expressly agreed to "guarantee ... against all defects of ... workmanship." One cannot profit from or escape liability for his own wrongdoing. See Keystone Bus Lines v. ARA Services, 214 Neb. 813, 336 N.W.2d 555 (1983). We affirm the trial court's action in denying the motion to dismiss Bevco's third-party complaint against Universal.
*608 Finally, Universal contends the trial court should have sustained Universal's motions for a directed verdict on the Church's claim. After Universal's motion for a directed verdict was overruled at the end of the Church's case, a witness described Universal's application of the paint. Such evidence was adduced by Universal's cross-examination of Bevco's witness and as a part of Universal's case in chief. Universal took the risk of aiding the Church's case by presentation of evidence, either in cross-examination of Bevco's witness or in presenting its own case in an attempt to defeat a recovery by the Church. The evidence produced by Universal helped establish the cause of the peeling paint, namely, noncompliance with the manufacturer's specifications for application of the paint. There can be no complaint by Universal that it supplied information to buttress or even prove the Church's cause of action. See Kentucky Aerospray v. Mays, 251 S.W.2d 460 (Ky.1952). "A defendant who moves for a directed verdict at the close of the plaintiff's evidence and, upon the overruling of such motion, proceeds with trial and introduces evidence waives any error in the ruling on the motion for directed verdict." Baker v. Blue Ridge Ins. Co., 215 Neb. 111, 114, 337 N.W.2d 411, 414 (1983). See, also, Bradstreet v. Grand Island Banking Co., 89 Neb. 590, 131 N.W. 956 (1911); Schaffer v. Strauss Brothers, 164 Neb. 773, 83 N.W.2d 543 (1957). Therefore, there is no question to be reviewed by this court regarding Universal's motion for a directed verdict at the end of the Church's case.
Universal also contends that at the close of all the evidence the trial court should have sustained Universal's second motion for a directed verdict on the question of faulty painting. A motion for a directed verdict at the conclusion of all the evidence is judged in the light of the total evidence at the time such motion is made, that is, the evidence as it stands at the close of the trial, and such motion is not determined only on the evidence existing at the time of the initial motion at the close of an adversary's case. See, 89 C.J.S. Trial § 668 (1955); Abston v. Medora Grain, Inc., 206 Kan. 727, 482 P.2d 692 (1971); Smith v. Sharp, 85 Idaho 17, 375 P.2d 184 (1962). When Universal moved for a directed verdict at the conclusion of all the evidence, the existing evidence created a question of fact about which reasonable minds might differ. The evidence supported the jury's finding that there was faulty workmanship of Universal in applying the paint. There is no error in the trial court's overruling Universal's motions for a directed verdict on the Church's claim of faulty painting.
Finally, Universal alleges error in granting a new trial to Bevco in the third-party action. In view of the disposition which we direct concerning the third-party action, we need not dispose of Universal's assignment of error in this regard.
We affirm the following judgments of the District Court: The judgment in favor of the Church against Bevco in the amount of $29,117; the judgment in favor of Bevco on its counterclaim against the Church in the amount of $16,750; the judgment in favor of the Church against Fidelity in the amount of $12,367; the judgment in favor of Universal against Bevco in the amount of $6,276; and the judgment awarding the Church an attorney fee of $7,500 as costs taxed to Fidelity as a part of the judgment on the performance bond covering Bevco.
We reverse the judgment of the trial court's granting a new trial to Bevco regarding the third-party action against Universal. It would be futile to remand for a new trial on Bevco's third-party complaint against Universal, since Universal is already bound by the judgment in the action of the Church against Bevco. Under the circumstances in this case the District Court would be required to direct the jury to return a verdict for Bevco against Universal in the amount of $29,117. Therefore, in addition to reversing the judgment of a new trial granted to Bevco, we remand this matter to the District Court and direct the District Court to enter judgment in favor of Bevco against Universal in the amount of $29,117 as a result of Bevco's third-party action against Universal.
*609 Concerning costs of the appeal in these proceedings, an attorney fee in the amount of $750 is awarded to the Church and assessed against Fidelity. With the exception of the attorney fee charged to Fidelity in this appeal, the costs of the appeal are taxed to Universal.
AFFIRMED IN PART, AND IN PART REVERSED AND REMANDED WITH DIRECTIONS.
WHITE and HASTINGS, JJ., concur in the result.
McCOWN, J., not participating.
