NATURE OF CASE
Appellants, Joseph Moglia and Amy Moglia, sued various subcontractors and the contractor, claiming that their home was defectively constructed. Appellants were the second owners of the home. The amended complaint filed January 15,2004, alleged three causes of action as follows: count I, “Breach of Implied Duty to Perform in a Workmanlike Manner”; count II, “Breach of Implied Warranty of Habitability”; and count III, “Negligence.” All appellees filed motions to dismiss under Neb. Ct. R. of Pldg. in Civ. Actions 12(b)(6) (rev. 2003). The district court granted the motions and dismissed the complaint. With the exception of the dismissal of count I, breach of implied duty to perform in a workmanlike manner alleged against the contractor, the McNeil Company, Inc., the district court did not err. We affirm in part, and in part reverse and remand for further proceedings.
STATEMENT OF FACTS
According to the complaint, in October 1994, the McNeil Company contracted with Michael and Kathleen Fahey to design and build a house in Omaha, Nebraska. The construction concluded, and the Faheys took possession óf the house on January 17, 1997. On August 1, 2001, appellants purchased the house from the Faheys. The Faheys are not parties to the instant litigation.
Appellants allege that beginning in December 2002 and continuing through October 2003, they discovered numerous defects in the design and construction of the house. Appellants specifically allege they first learned of roofing defects in December 2002 when they engaged a home inspector to inspect the premises for insurance purposes. They thereafter learned of drainage problems. Appellants allege that some or all defects violate the Omaha building codes.
On September 5, 2003, appellants filed suit against the contractor and several subcontractors who worked on the house. On January 15, 2004, appellants filed an amended complaint *244 (complaint), naming as defendants the contractor, the McNeil Company, and Patrick McNeil, an employee of McNeil Company; the roofing subcontractor, KD Roofing, Inc., and Keith M. Duggan, an employee of K D Roofing; and the drainage subcontractor, Landgraphics, Inc. All defendants are appellees on appeal. The complaint contains three counts, asserted against various defendants, as follows: count I, “Breach of Implied Duty to Perform in a Workmanlike Manner,” alleged against the McNeil Company, KD Roofing, Duggan, and Landgraphics; count II, “Breach of Implied Warranty of Habitability,” alleged against the McNeil Company; and count III, “Negligence,” alleged against all defendants. Appellants alleged they had sustained various damages and sought relief therefor.
In response to the allegations in appellants’ complaint, each defendant filed a motion to dismiss under rule 12(b)(6), claiming that the complaint failed to state a claim upon which relief could be granted. The motions came on for hearing on April 6, 2004. In dismissing the complaint, the district court concluded that Nebraska did not recognize a cause of action for breach of an implied warranty of habitability. Thereafter, the district court concluded that all of appellants’ claims sounded in contract and not in negligence. Finally, the district court determined that appellants lacked privity of contract with all of the defendantappellees and that as such, the complaint failed to state a cause of action. The district court granted all appellees’ motions and dismissed appellants’ complaint with prejudice. Appellants filed this appeal.
ASSIGNMENT OF ERROR
Appellants claim that the district court erred in sustaining each appellee’s motion to dismiss.
STANDARD OF REVIEW
A district court’s grant of a motion to dismiss for failure to state a claim under rule 12(b)(6) is reviewed de novo, accepting all the allegations in the complaint as true and drawing all reasonable inferences in favor of the nonmoving party.
Anderson v. Wells Fargo Fin. Accept.,
*245 ANALYSIS
Count I, Breach of Implied Duty to Perform in Workmanlike Manner, Was Properly Dismissed as to K D Roofing,
Duggan, and Landgraphics but Was Improperly Dismissed as to McNeil Company.
Appellants allege in count I of the complaint that K D Roofing, Duggan, Landgraphics, and the McNeil Company breached an implied duty to perform in a workmanlike manner. On appeal, appellants claim that the district court erred when it dismissed count I for failure to state a cause of action. As to K D Roofing, Duggan, and Landgraphics, we conclude the district court did not err in dismissing count I. However, we conclude that the district court erred in dismissing count I as to the McNeil Company.
With respect to K D Roofing, Duggan, and Landgraphics, we agree with the district court that in the absence of an allegation of privity, count I, styled “Breach of Implied Duty to Perform in a Workmanlike Maimer,” fails to state a cause of action against these subcontractors. We have long held that in the absence of an otherwise binding agreement, express or implied, there is no privity of contract between a subcontractor and the property owner who negotiated the original agreement with the general contractor.
Boyd v. Benkelman Public Housing Authority,
In urging this court to extend the warranty of workmanlike performance in favor of subsequent owners despite the absence of privity, appellants refer us to several Nebraska cases, including
Peterson
v.
North American Plant Breeders,
Unlike subcontractors, as to contractors, we have long recognized that “[a]s a general rule a contractor constructing a building impliedly warrants that the building will be erected in a workmanlike manner . . . .”
Henggeler
v.
Jindra,
Although we have not previously extended the warranty, we are aware that elsewhere, the warranty of workmanlike performance has explicitly been extended to subsequent purchasers. E.g.,
Aronsohn v. Mandara,
*247 Various public policy rationale have been offered in extending the implied warranty of workmanlike performance in favor of subsequent purchasers. In explaining why the privity requirement should be abandoned between a subsequent purchaser and a contractor in connection with an implied warranty of workmanlike performance, the court in Aronsohn, supra, stated that to require privity
in such a situation would defeat the purpose of the implied warranty of good workmanship and could leave innocent homeowners without a remedy for negligently built structures in their home. The contractor should not be relieved of liability for unworkmanlike construction simply because of the fortuity that the property on which he did the construction has changed hands.
In
Richards, supra,
the court held that privity should not be required between a remote purchaser and a contractor with respect to “the implied warranty of workmanship and habitability.”
Upon due consideration, we agree that liability under the implied warranty of workmanlike performance should be further implied and extended to subsequent home purchasers as against general contractors and that this extension should be circumscribed by certain limitations which we note other courts have adopted. E.g.,
Richards v. Powercraft Homes, Inc.,
Given our conclusion that the implied warranty of workmanlike performance extends in favor of subsequent purchasers against contractors with the limitations noted above, and drawing all reasonable inferences in the complaint in favor of appellants, we conclude that the district court erred in dismissing count I as to the McNeil Company. This portion of the district court’s order is reversed, and the cause remanded for further proceedings.
Count II, Breach of Implied Warranty of Habitability Was Properly Dismissed.
Appellants allege in count II of the complaint that the McNeil Company breached an implied warranty of habitability. On appeal, appellants claim that the district court erred when it dismissed count II for failure to state a cause of action. We conclude the district court did not err in dismissing count II.
*249 It has been stated that
the basic elements of the implied warranty of habitability are that it applies to purchasers of residences against builders and ensures that there are no defects in materials or workmanship that make a dwelling unfit for habitation. . . .
The premise behind the warranty is that every contract to erect a structure contains an implied warranty that the structure shall be fit to live in.
3 C. Allen Foster et al., Construction and Design Law § 20.4a at 44 (1998).
Relying primarily on language found in
Lange Indus. v. Hallam Grain Co.,
We are aware that the implied warranty of habitability has been adopted by a great many states and extended to subsequent owners. E.g.,
Redarowicz v. Ohlendorf
In a case describing the implied warranty of habitability, it has been observed that “[hjabitability is synonymous with suitability for living purposes; the home must be occupiable.”
Aronsohn v. Mandara,
Count III in Negligence Was Properly Dismissed.
Appellants claim that the district court erred when it dismissed the negligence count, count III, asserted against all appellees. Appellants contend on appeal, as they did in district court, that the law ought to impose on all appellees a duty of care in favor of subsequent owners such as appellants. Appellees claim that the district court was correct when it concluded that, notwithstanding appellants’ characterization of count III as a cause of action in “negligence,” the duties alleged therein stemmed from the underlying contract between the contractor and the original owners such that count III failed to allege a legal duty owed to subsequent owners and thus failed to state a negligence cause of action. We agree with the district court that the complaint does not state a cause of action in negligence in favor of appellants.
In urging this court to conclude that a cause of action in negligence exists as against each appellee, appellants focus primarily on foreseeability. Appellants argue that the risk of harm to subsequent owners was clearly foreseeable, thus giving rise to a case in negligence. Appellants refer us to cases such as
Keyes
v.
Guy Bailey Homes, Inc.,
Appellees direct us to contrary authority such as
Foxcroft Townhome Owners
v.
Hoffman Rosner,
Whether a legal duty in negligence exists is a question of law.
Richards
v.
Meeske,
The fundamental difference between tort and contract lies in the nature of the interests protected. Tort actions are created to protect the interest in freedom from various kinds of harm. The duties of conduct which give rise to them are imposed by the law, and are based primarily upon social policy, and not necessarily upon the will or intention of the parties. They may be owed to all those within the range of harm, or to some considerable class of people. Contract actions are created to protect the interest in having promises performed. Contract obligations are imposed because of conduct of the parties manifesting consent, and are owed only to the specific individuals named in the contract.
William L. Prosser, Handbook of the Law of Torts § 92 at 613 (4th ed. 1971).
In analyzing appellants’ argument, it is important to distinguish between the question of to
whom
a duty is owed upon which appellants focus and the question of
what
duty is owed. We have repeatedly said that in negligence cases, the duty is always the same, to conform to the legal standard of reasonable conduct in light of the apparent risk.
Cerny v. Cedar Bluffs Jr./Sr. Pub. Sch.,
*252 In determining whether a duty exists, [an appellate] court employs a risk-utility test, considering (1) the magnitude of the risk, (2) the relationship of the parties, (3) the nature of the attendant risk, (4) the opportunity and ability to exercise care, (5) the foreseeability of the harm, and (6) the policy interest in the proposed solution.
Fuhrman v. State,
Because this case was decided on a motion to dismiss, we refer to the complaint to determine the duties of the parties. We have stated:
In order to decide the form of redress, whether contract or tort, it is necessary to know the source or origin of the duty or the nature of the grievance. Attention must be given to the cause of the complaint; in other words, the character of the action must be determined from what is asserted concerning it in the petition in the cause.
Fuchs v. Parsons Constr. Co.,
With respect to appellants’ allegation that the defects violated Omaha building codes, we agree with appellants that building codes create a legal duty, thus giving rise to a potential negligence claim. See Mondelli, supra (discussing negligence action based on violation of construction building code brought by original owners against city). Assuming for analysis that the failure to construct the house according to code is a breach of a legal duty giving rise to a potential negligence claim, a review of the *253 complaint shows that due to the “accepted work doctrine” discussed below, the claim does not benefit appellants.
We review the complaint to ascertain the facts underlying our analysis, accepting all the allegations in the complaint as true and drawing all reasonable inferences in favor of appellants. The complaint shows that appellants were not the original owners or occupiers of the house. The complaint alleges that the defects existed in January 1997, but that appellants did not purchase the house from the original owners until August 2001. The original owners thus accepted the house. The complaint does not allege that appellants had an inspection performed prior to purchasing the house. The complaint does not allege that appellants protected themselves by express agreement in the deed or contract for sale by taking an assignment of the rights which the original owners may have had. See
Lee v. Clark and Associates Real Estate, Inc.,
Appellees refer us to and appellants concede that Nebraska applies the “accepted work doctrine” in construction cases. See,
Dvorak
v.
Bunge Corp.,
The general rule is that a construction contractor is not liable for injuries or damage to a third person with whom he is not in contractual relation resulting from the negligent performance of his duty under his contract with the contractee where the injury or damage is sustained after the work is completed and accepted by the owner. Delicious Foods Co. v. Millard Warehouse,244 Neb. 449 ,507 N.W.2d 631 (1993); Erickson v. Monarch Indus.,216 Neb. 875 ,347 N.W.2d 99 (1984); Stover v. Ed Miller & Sons, Inc.,194 Neb. 422 ,231 N.W.2d 700 (1975).
We have also stated: “This court has recognized an exception to the accepted work doctrine in situations where the parties dealt with inherently dangerous elements or the defect at issue was latent and could not have been discovered by the owners or
*254
employer.”
Id.
The roofing defects and drainage defects alleged in the complaint are not inherently dangerous. Compare
Dvorak, supra
(stating that installation of high voltage wiring through conduit and connection of such wiring were inherently dangerous). Furthermore, although the complaint states that the defects were “not reasonably discoverable” by appellants, this allegation does not satisfy the exception to the accepted work doctrine that the defect “could not have been discovered.” See
Parker,
To summarize, count III fails to state a cause of action in negligence. There are no allegations which would impose a legal duty on any appellee in favor of appellants, and to the extent a legal duty based on building code violations is alleged, the accepted work doctrine precludes the cause of action based in negligence. Count III in negligence was properly dismissed.
CONCLUSION
With the exception of the dismissal of count I, implied duty to perform in a workmanlike manner alleged against the McNeil Company, the district court did not err in granting the appellees’ motions to dismiss. Accordingly, we affirm in part, and in part reverse and remand for further proceedings.
Affirmed in part, and in part reversed and REMANDED FOR FURTHER PROCEEDINGS.
