
    785 S.E.2d 627
    J.F. ALLEN CORPORATION, A West Virginia Corporation, Plaintiff Below, Petitioner v. The SANITARY BOARD OF the CITY OF CHARLESTON, West Virginia, Defendant Below, Respondent.
    No. 15-0089.
    Supreme Court of Appeals of West Virginia.
    Submitted March 8, 2016.
    Decided April 7, 2016.
    
      Charles M. Johnstone, II, Esq., Johnson W. Gabhart, Esq., Johnstone & Gabhart, LLP, Charleston, WV, for Petitioner.
    David Allen Barnette, Esq., Vivian H. Bas-dekis, Esq., Jackson Kelly, PLLC, Charleston, WV, for Respondent.
   LOUGHRY, Justice:

The petitioner, J.F. Allen Corporation (“J.F. Allen”), appeals a January 5, 2015, order of the Circuit Court of Kanawha County dismissing, with prejudice, its breach of contract claim against the respondent, the Sanitary Board of the City of Charleston, West Virginia (“CSB”), pursuant to Rule 12(b)(6) of the West Virginia Rules of Civil Procedure. In this appeal, J.F. Allen seeks reversal of the circuit court’s order, contending that it alleged sufficient facts in its amended complaint, that if considered as true, would entitle it to relief.

Upon consideration of the briefs and arguments of the parties, the submitted record, and the pertinent authorities, we find that J.F. Allen has set forth a claim, upon which relief could be granted. Accordingly, for the reasons set forth below, the final order of the circuit court is reversed, and this case..is remanded for further proceedings consistent with this opinion.

I. Factual and Procedural Background

On December 13, 2011, CSB, a utility owner, and J.F. Allen, a utility contractor, entered into a written agreement for construction work described as “Kanawha Two-Mile Creek Sewer .Improvements—Sewer Replacements Sugar Creek Drive Sub-Area, Contract 10-8.” The project involved a series of improvements to the City of Charleston’s municipal sewer system. The contract work was to include eight-inch and ten-inch gravity sewer replacements, manhole installation, house service connections, and restoration of paved and non-paved areas. Burgess and Niple, Inc. (“B & N”) provided professional services to CSB and served as the engineer/architect on the project. The contract price was $5,160,621.75 but was “subject to additions and deductions by change orders and quantities actually performed.” The contract required substantial completion of the project by January 2, 2013, and final completion by February 1, 2013.

Construction under the contract began on January 9, 2012, but was not completed until August 15, 2013. It is undisputed that six change orders and quantity adjustments were made during the project that increased the contract price by the amount of $394,977.00 for a final adjusted contract price of $5,555,598.00. After final payment was made under the contract, J.F. Allen submitted a written request seeking additional compensation from CSB for extra, non-contractual work that it maintains was ■ required by CSB and for increased costs that resulted from numerous delays and disruptions encountered during the project. CSB refused the request.

.Having been denied additional compensation, J.F. Allen filed a complaint in the Circuit Court' of Kanawha County on June 30, 2014, asserting breach of contract and unjust enrichment claims against CSB. The complaint alleged, inter alia, that CSB: .failed to provide J.F. Allen with accurate and adequate plans, specifications, and documents related to the work to be performed; dictated and changed the manner and method of performance; and interrupted and interfered with J.F. Allen’s ability to perform its com tractual obligations. The complaint further asserted that as a direct result of CSB’s material breach of contract, J.F. Allen suffered substantial financial loss. In response, CSB filed a motion to dismiss pursuant to Rule 12(b)(6) of the West Virginia Rules of Civil Procedure,

A hearing was held before the circuit court on September 16, 2014. At that hearing, CSB argued that J.F. Allen’s breach, of contract claim was stated too broadly and that it was required to identify each event that allegedly resulted in additional costs and delays. CSB further argued the unjust enrichment claim was barred because there was an express contract. After listening to the parties’ arguments, the circuit court granted' CSB’s motion to dismiss with regard to the unjust enrichment claim but gave J.F. Allen thirty days to amend its breach of contract claim.

J.F. Adíen filed its amended complaint asserting a breach of contract claim against CSB on November 13, 2014. The amended complaint alleged that the contract required CSB to provide construction plans that showed the location of other underground facilities and allowed for adjustment of the contract price to the extent conditions encountered in performing the work were different from those indicated on the plans. J.F. Allen further alleged that, during the course of the project, there were 122 incidents where other utility lines or structures were damaged because they were unmarked or mismarked on the construction plans. J.F. Allen asserted that these incidents caused it to incur additional costs for repairs, delay, and lost productivity. J.F. Allen claimed that these incidents were conscientiously documented by CSB’s onsite representative but CSB refused to provide additional compensation, thereby breaching the contract.

The amended complaint also alleged CSB breached the agreement by allowing other contractors to perform work that interfered with J.F. Allen’s work without giving prior notice as required by the contract and by not providing additional compensation for the resulting extra costs. J.F. Allen asserted that CSB waived the contract’s provision requiring written notice of claims for extra compensation in failing to comply with the notice provision with regard to the work by other contractors.

Additionally, the amended complaint alleged that CSB ordered J.F. Allen to delay final paving and to perform additional work, including temporary paving, for which there was no bid item in the contract. J.F. Allen asserted that it entered into a subsequent oral agreement with CSB in contravention of the change order provision in the contract that provided for additional compensation for this extra work. J.F. Allen also contended that CSB directed it to perform restoration work on homeowners’ properties along the project right-of-way to repair damages that were unrelated to J.F. Allen’s contract work. Finally, J.F. Allen alleged that it suffered a substantial financial loss as a direct, proximate and foreseeable result of CSB’s material breach of contract.

CSB responded to the amended complaint by filing another motion to dismiss pursuant to Rule 12(b)(6). A hearing was held on December 2, 2014. Subsequently, the circuit court entered the final order finding that “the risk of liability with respect to Underground Facilities was contemplated by the parties at the time of contracting and was allocated to J.F. Allen, not CSB” and “[J.F. Allen] ha[d] not made any claim of timely “written notice,’ nor ha[d] it pled any specific facts to show that it followed the protocol for possible changes to the Contract Documents due to differing or unanticipated conditions arising from Underground Facilities] not shown or indicated on Contract Documents.” Accordingly, the circuit court granted CSB’s motion to dismiss the breach of contract claim with prejudice. The final order was entered on January 5, 2015, and this appeal followed.

II. Standard of Review

It is well-established that “‘[a]ppel-late review of a circuit court’s order granting a motion to dismiss a complaint is de novo.’ Syllabus point 2, State ex rel. McGraw v. Scott Runyan Pontiac-Buick, Inc., 194 W.Va. 770, 461 S.E.2d 516 (1995).” Syl. Pt. 1, Albright v. White, 202 W.Va. 292, 503 S.E.2d 860 (1998). With this standard in mind, we address the parties’ arguments.

III. Discussion

Rule 8(f) of the West Virginia Rules of Civil Procedure requires that all pleadings ‘Tie so construed as to do substantial justice.” To that end, “[f]or purposes of the motion to dismiss, the complaint is construed in the light most favorable to the plaintiff, and its allegations are to be taken as true.” John W. Lodge Distributing Co., Inc. v. Texaco, Inc., 161 W.Va. 603, 605, 245 S.E.2d 157, 158 (1978). In other words, “[a] trial court considering a motion to dismiss under Rule 12(b)(6) must liberally construe the complaint[.]” Cantley v. Lincoln Co. Com’n, 221 W.Va. 468, 470, 655 S.E.2d 490, 492 (2007).

“The purpose of a motion under Rule 12(b)(6) of the West Virginia Rules of Civil Procedure is to test the sufficiency of the complaint.” Cantley, 221 W.Va. at 470, 655 S.E.2d at 492. This Court has held that “[t]he trial court, in appraising the sufficiency of a complaint on a Rule 12(b)(6) motion, should not dismiss the complaint unless it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief. Conley v. Gibson, 355 U.S. 41, 45-46, 78 S.Ct. 99, 2 L.Ed.2d 80 (1957) ” Syl. Pt. 3, Chapman v. Kane Transfer Co., Inc., 160 W.Va. 530, 236 S.E.2d 207 (1977). Stated another way, “a trial court should not dismiss a complaint where sufficient facts have been alleged that, if proven, would entitle the plaintiff to relief.” Cantley, 221 W.Va. at 470, 655 S.E.2d at 492. “The motion to dismiss for failure to state a claim [is] viewed with disfavor and [should be] rarely granted.” John W. Lodge Distributing, 161 W.Va. at 606, 245 S.E.2d at 159. Therefore, “if the complaint states a claim upon which relief can be granted under any legal theory, a motion under Rule 12(b)(6) must be denied.” Id., 161 W.Va. at 605, 245 S.E.2d at 159.

The circuit court granted CSB’s motion to dismiss based on its finding that the contract allocated the risk of liability with respect to underground facilities to J.F. Allen, not CSB, and J.F. Allen had failed to timely submit and preserve its claims for adjustment of the price. Upon review, we find the circuit court’s conclusions are erroneous. Moreover, it is clear that J.F. Allen has stated a claim in the amended complaint—if proven— upon which relief could be granted.

J.F, Allen alleged in the amended complaint that the contract provided for adjustment of the price where underground facilities not shown or accurately located on the construction documents were encountered during the course of the, project. Indeed, the contract provided, in relevant part:

If an Underground Facility is uncovered or revealed at or contiguous to the Site which was not shown or indicated, or not shown or indicated with reasonable accuracy in the Contract Documents, Contractor shall, promptly after becoming aware thereof and before further disturbing conditions affected thereby or performing any Work in connection therewith (except in an emergency as required by Paragraph 6.16A, identify the owner of such Underground Facility and give written notice to that owner and to Owner. and Engineer.) Engineer will promptly review the Underground Facility and determine the extent, if any, to which a change is required in the Contract Documents to reflect and document the consequences of the existence of or location of the Underground Facility. During such time, Contractor shall be responsible for the safety and protection of such Underground Facility.
If Engineer concludes that a change in the Contract Documents is required, a Work Change Directive or a Change Order will be issued to reflect and document such consequences. An equitable adjustment shall be made in the Contract Price or Contract Times, or both, to the extent that they are attributable to the existence or location of any Underground Facility that was not shown or indicated with reasonable accuracy in the Contract Documents and that the Contractor did not know of and could not have reasonably have been expected to be aware of or to have anticipated. If Owner and Contractor are unable to agree on entitlement to or the amount or extent, if any, of any such adjustment in Contract Price or Contract Times, Owner or Contract may make a Claim therefore as provided in 10.05. (emphasis added)

Ignoring this contractual provision, the circuit court found that liability for underground facilities was allocated to J.F. Allen and not CSB, based upon other provisions in the contract concerning underground facilities shown or accurately located on the construction plans. Given that the contract expressly provided for a possible equitable adjustment of the contract price as a result of the existence of an underground facility not shown on the construction plans, the circuit court’s conclusion that J.F. Allen’s claims were barred by the . contract was clearly erroneous.

Likewise, the circuit court erroneously concluded J.F. Allen’s claims were barred because no written request for additional compensation- was submitted before final payment was made under the contract. In concluding the claims were untimely, the circuit court relied upon a provision in the contract requiring written notice of a claim nd later than thirty days after the start of the event giving rise to the claim. However, the complaint alleged that CSB had actual notice through its onsite representative who documented each event as it occurred. The circuit court wholly ignored the fact that such documentation could constitute a written notice if viewed in the light most favorable to >J.F. Allen. Furthermore, the complaint asserted that CSB waived the written notice requirement by failing itself to comply with the provision. This Court has recognized that contract provisions providing for timely written notice of changes or claims can be amended, waived or abrogated by the conduct of the parties. In that regard, we have held:

“Ordinarily, where a construction contract contains language to the effect that its terms cannot be changed without the written consent of the parties thereto, then such written consent is required unless this condition is waived by the parties by them conduct or through circumstances that justify avoiding the requirement.” Syllabus Point 1, Pasquale v. Ohio Power Co., 186 W.Va. 501, 413 S.E.2d 156 (1991).

Syl. Pt. 1, Ground Breakers, Inc. v. City of Buckhannon, 188 W.Va. 42, 422 S,E.2d 519 (1992). Assuming the allegations set forth by J.F. Allen in the amended complaint to be true, as we are required to do, the circuit court’s conclusion that J.F. Allen’s claims were barred based upon the court’s interpretation of a particular contractual provision was error.

The circuit court also failed to acknowledge the fact that J.F. Allen’s breach of contract claim was not based solely upon CSB’s alleged failure to provide additional compensation for damages incurred as a result of mismarked or unmarked underground facilities on the construction plans. Additionally, the complaint alleged that the parties modified other provisions in the contract pertaining to paving and restoration of homeowners’ properties through a subsequent oral agreement. In particular, the complaint alleged in paragraphs twenty-two through twenty-four: ■

22. Because of CSB’s decision to delay final paving, the Defendants decided to have trenches temporarily paved. Unfortunately, the Contract documents and bid - schedule contained no bid item for tempo- ' rary paving.
23. Rather then follow the contractually required change of order process to allow J.F. Allen to bill for temporary paving, the Defendant instructed J.F. Allen to bill for the temporary paving work utilizing another bid item. As instructed, and in contravention to the formal requirements of the Contract, J.F. Allen billed for the temporary paving using a bid item for milling. The process was directed and approved by both Defendants.
24. Unfortunately, the milling bid item which J.F. Allen was required to utilize to bill for the temporary paving was on a square yard basis. The agreement reached by and between J.F. Allen and the Defendants called for substitution of temporary paving at a thickness of three-quarters of an inch in place of the milling bid items. However, instead of three-quarters of inch of temporary paving, at the express direction and requirement of the Defendants, J.F. Allen was ordered to and in fact did pave much larger areas than had been agreed and in thicknesses of as much as five or six inches. J.F. Allen placed much more material over a much larger area than anticipated and, therefore a simple substitution of the temporary paving item for the milling item did not adequately compensate J.F. Allen for the extra work it was ordered to perform.

The complaint also asserted in paragraphs twenty-seven and twenty-eight:

27. [0]n this particular project, CSB and B & N allowed, and in fact encouraged, homeowners along [the] project right-of-way to make claims for restoration costs for damages and that had nothing to do with J.F. Allen’s work. Instead of requiring the homeowners to provide proof of damages caused by J.F. Allen’s work, CSB and B & N directed J.F. Allen to make repairs to a substantial number of homeowners’ properties including, but not limited to: repair/replacement of driveways; retaining walls; guardrails; road shoulders; lawn repair and landscaping improvements that were unrelated to J.F. Allen’s work. None of this restoration work was required by of [sic] the contract nor was it contemplated by the parties at the time the contract was entered into, The work was performed by J.F. Allen at the direction of and for the benefit of both CSB and B & N and is therefore compen-sable under the contract as extra work.
28. The Defendants had immediate, actual notice of the restoration claims as complaints were made by the homeowners directly to the Defendants and the Defendants, in turn, required J.F. Allen to perform this extra work although it was not required by the contract.

Thus, the complaint alleges that the parties had ongoing conversations about extra work to be performed by J.F. Allen as directed by CSB with the attendant expectation that J.F, Allen would receive additional compensation.

It is a well-established, fundamental principle of contract law that a valid, unambiguous written contract may be modified or superseded by a subsequent contract based on a valuable consideration. Wilkinson v. Searls, 155 W.Va. 475, 184 S.E.2d 735 (1971); Steinbrecher v. Jones, 151 W.Va. 462, 153 S.E.2d 295 (1967); syl. pt. 1, Lewis v. Dils Motor Co., 148 W.Va. 515, 135 S.E.2d 597 (1964); State ex rel. Coral Pools, Inc. v. Knapp, 147 W.Va. 704, 131 S.E.2d 81 (1963); see 4B M.J., Contracts § 54 (1974).

John W. Lodge Distributing, 161 W.Va. at 606, 245 S.E.2d at 159; see also Ground Breakers, 188 W.Va. at 43, 422 S.E.2d at 520, syl. pt. 1. Consequently, the allegations set forth in the amended complaint are adequate to support a claim for damages under our law.

“The standard which plaintiff must meet to overcome a Rule 12(b)(6) motion is a liberal standard, and few complaints fail to meet it.” John W. Lodge Distributing, 161 W.Va. at 606, 245 S.E.2d at 159. Here, J.F. Allen set forth several legal theories in its amended complaint upon which relief could be granted. “[W]hether the plaintiff can prevail is a matter properly determined on the basis of proof and not merely on the ■ pleadings.” Id at 605-06, 245 S.E.2d at 159. In other words, whether J.F. Allen did, in fact, satisfy the requirements of the contract, and whether CSB did, in fact, breach its obligations under the contract or whether elements of the contract were waived or amended by the parties, are questions of fact that should only be resolved after the parties have had an opportunity to engage in discovery. .

IV. Conclusion

Accordingly, for the reasons set forth above, the final order of the Circuit Court of Kanawha County entered on January 5, 2015, is reversed, and this ease is remanded for further proceedings consistent with this opinion.

Reversed and remanded. 
      
      . According to J.F. Allen, no written order was entered regarding the circuit court's ruling.
     
      
      . The amended complaint did not assert an unjust enrichment claim, and the circuit court’s dismissal of the unjust enrichment claim in the original complaint- was not assigned as error.
     
      
      . J.F. Allen asserted a negligence claim in both the original and the amended complaint against B & N, B & N is not a party in this appeal, and the status of the negligence claim against B & N is not set forth in the record, although it appears to be still pending below. In McGraw v. Scott Runyan Pontiac-Buick, Inc., 194 W.Va. 770, 775, 461 S.E.2d 516, 521 (1995), we explained that our jurisdiction does not generally encompass appeals from a denial or granting of a motion to dismiss where there are remaining issues to be litigated. However, we recognized an exception to this rule where the dismissal has the effect of "gutting the lawsuit for all practical purposes.” Id. In such cases, the dismissal "approximates a final order in its nature and effect” and, therefore, is immediately appealable. Id., 194 W.Va. at 773, 461 S.E.2d at 519, syl. pt. 1. Upon review, we find that the circuit court's January 5, 2015, order satisfies the requirements for immediate appellate consideration.
     
      
      . In ruling upon the motion to dismiss, the circuit court examined the contract at issue, which was attached as an exhibit to CSB’s motion to dismiss. The circuit court made clear, however, that it was not converting the motion to dismiss to a motion for summary judgment under Rule 56 of the West Virginia Rules of Civil Procedure. J.F. Allen argues that the circuit court erred by considering the contract because it was not attached to the complaint and by only applying select provisions of the contract in reaching its decision. As discussed more fully herein, we agree that the circuit court’s application of select contractual provisions was erroneous but note that consideration of the contract itself was proper. See Forshey v. Jackson, 222 W.Va. 743, 747-48, 671 S.E.2d 748, 752-53 (2008) (explaining that court may consider documents attached to complaint as exhibit or incorporated by reference in ruling upon 12(b)(6) motion); see also Franklin D. Cleckley, Robin J. Davis & Louis J. Palmer, Jr., Litigation Handbook on West Virginia Rules of Civil Procedure § 12(b)(6)[2] at 384 (4th ed.2012) (stating court may consider "documents referred to in the complaint but not annexed to it’’ in determining whether complaint states claim upon which relief may be granted).
     
      
      . J.F. Allen also argued that the circuit court erred by dismissing the complaint with prejudice. While this issue is mooted by our. decision, we note that "the dismissal of an action under Rule 12(b)(6) W.Va. RCP for failure to state a claim upon which relief can be granted shall be a bar to the prosecution of a new action grounded in substantially the same facts, unless the lower court in "the first action specifically dismissed without prejudice^]” Syl. Pt. 5, in part, Sprouse v. Clay Communication, Inc., 158 W.Va. 427, 211 S.E.2d 674 (1975).
     
      
      . As set forth herein, we construed the facts and allegations in the complaint as true in accord with our precedent for purposes of determining whether dismissal of the complaint was warranted under Rule 12(b)(6). This opinion should not be interpreted as ruling upon tire merits of any part of the complaint or the issues in the case below.
     