
303 S.E.2d 365 (1983)
ASHEVILLE CONTRACTING COMPANY, INC., Taylor Contracting Company, Inc.,
v.
CITY OF WILSON, A North Carolina Municipal Corporation,
v.
L.E. WOOTEN AND COMPANY, a North Carolina Corporation.
No. 827SC576.
Court of Appeals of North Carolina.
June 7, 1983.
*366 Lee, Reece & Oettinger Wilson, and Adams, Hendon, Carson & Crow, P.A. by George Ward Hendon, Asheville, for plaintiffs-appellants.
Rose, Jones, Rand & Orcutt, P.A. by Z. Hardy Rose and L.P. Fleming, Jr., Wilson, for defendant-appellee.
*367 WELLS, Judge.
The question before us central to the disposition of this appeal is whether either plaintiff is entitled to go to trial on their claims in negligence against defendant Wilson. Before reaching that question we must dispose of two preliminary procedural questions.
First we must decide whether Judge Brown could properly consider defendant's motion, Judge Reid having already ruled on a prior motion by defendant for summary judgment. In Biddix v. Construction Corp., 32 N.C.App. 120, 230 S.E.2d 796 (1977), relying on the ordinary rule that one superior court judge may not overrule the judgment of another superior court judge in the same action, this Court held that it was error for the trial judge to grant summary judgment for the defendants where in doing so he reversed another judge's previous denial of the defendants' motion for summary judgment. In the present case, Judge Reid made clear that he was not considering the question of whether the materials before him showed that plaintiffs had a claim in tort. During oral argument of this case it became clear that neither defendant nor the trial judge had actually anticipated that plaintiffs would rely on a tort theory in support of their claim and that plaintiffs never revealed that they intended to rely on a tort theory until defendant's motion came on for hearing before Judge Reid. Under these circumstances, it was not error for Judge Reid to decline to rule on defendant's motion with respect to plaintiffs' tort claim. Defendant Wilson notified plaintiffs that it was making a second motion and plaintiffs presumably were at the hearing before Judge Brown. The record does not show that plaintiffs raised any objection to Judge Brown's hearing of the second motion until after summary judgment as to their tort claims was entered. When Judge Brown heard defendant's second motion for summary judgment, he dealt only with the matter Judge Reid had specifically declined to rule on and, thus, he in no way changed the effect of Judge Reid's ruling. While it may have been the better practice for defendant to request that Judge Reid defer his judgment on plaintiffs' contract claim until such time as he was prepared to rule also on their tort claim, since his ruling on defendant's motion effectively disposed of only part of the questions raised, defendant was entitled to have the remaining question decided and Judge Brown did not err in hearing defendant's second motion for summary judgment.
Second, we note that while defendant's second motion was designated as both a Rule 12(b)(6) motion and a Rule 56(b) motion, Judge Brown considered "the record" in the action in addition to plaintiffs' amended complaint and he found that there existed no genuine issue as to any material fact. As the record before Judge Brown contained evidentiary materials going beyond the pleadings, the judgment before us must be treated as a grant of defendant's motion for summary judgment and not as a dismissal pursuant to Rule 12(b)(6). G.S. 1A-1, Rule 12(b); Oliver v. Roberts, 49 N.C.App. 311, 271 S.E.2d 399 (1980), cert. denied, ___ N.C. ___, 276 S.E.2d 283 (1981).
Rule 56(c) of the North Carolina Rules of Civil Procedure provides that summary judgment "shall be rendered forthwith if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that any party is entitled to a judgment as a matter of law."
The purpose of the rule is to eliminate formal trials where only questions of law are involved. The procedure under the rule is designed to allow a preview or forecast of the proof of the parties in order to determine whether a jury trial is necessary. Put another way, the rule allows the trial court "to pierce the pleadings" to determine whether any genuine factual controversy exists....
A party moving for summary judgment may prevail if it meets the burden (1) of proving an essential element of the opposing party's claim is nonexistent, or (2) of showing through discovery that the opposing party cannot produce evidence *368 to support an essential element of his or her claim.... If the moving party meets this burden, the non-moving party must in turn either show that a genuine issue of material fact exists for trial or must provide an excuse for not doing so.... The goal of this procedural device is to allow penetration of an unfounded claim or defense before trial.
Lowe v. Bradford, 305 N.C. 366, 289 S.E.2d 363 (1982) (cites omitted).
The essential allegations in plaintiffs' amended complaint are as follows:

. . . . .
3. On or about November 1, 1974 plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., and defendant entered into a contract under the terms and conditions of which said plaintiff agreed to perform the clearing and grubbing portion of the construction of Buckhorn Reservoir in Wilson County, North Carolina; and defendant agreed to pay said plaintiff for the work the sum of $248,000.00, which contract price was subsequently revised by defendant to $279,137.00 on account of extra work performed by said plaintiff.
4. On or about November 1, 1974 the defendant, City of Wilson, contracted with Blythe Brothers Company for the construction of a dam across Contentnea Creek and for the grubbing and clearing of the area adjacent to the construction site of the dam. Both the dam and the site that Blythe Brothers Company contracted to grub and clear were downstream of Contentnea Creek from the area that plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., had contracted with the defendant to grub and clear.
4A. That at the time of the matters and things hereinafter complained of and at the time the defendant, THE CITY OF WILSON, entered into the aforesaid contract with the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., it was agreed between the plaintiffs that Taylor Contracting Company would perform the contract between the ASHEVILLE CONTRACTING COMPANY, INC., and THE CITY OF WILSON, NORTH CAROLINA, and that Taylor Contracting Company would be entitled to all the rights and benefits under the said contract the same as if it were the named contracting party, or as a sub-contractor of ASHEVILLE CONTRACTING COMPANY, INC., with full assignment of ASHEVILLE CONTRACTING COMPANY, INC'S rights under said contract.
This arrangement was fully understood by all the parties including the defendant, THE CITY OF WILSON, and defendant's agent and representative, L.E. WOOTEN AND COMPANY.
5. At the time of the matters and things hereinafter complained of L.E. WOOTEN AND COMPANY, a North Carolina corporation, performed the engineering services for the defendant for the construction of the Buckhorn Reservoir and at all times referred to herein, the said L.E. WOOTEN AND COMPANY was the agent and representative of the defendant in the performing of its engineering services for the construction of the Buckhorn Reservoir.
6. At the time the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., and the defendant entered into the contract for the plaintiffs to grub and clear the area referred to herein, it was in the contemplation of all parties that the waters of Contentnea Creek would continue to flow and the water flow of the creek would not be obstructed so as to raise the water table or flood the area that the plaintiffs had contracted to grub and clear until after the plaintiffs had completed their work under the contract.
Further, the defendant promised either expressly, constructively, or impliedly in its contract with the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., that it would not do any act either directly or indirectly which would cause the plaintiffs' work under the contract to be more difficult, time-consuming or costly without compensating the plaintiffs therefor in accordance with the contract.
The defendant owed the plaintiffs the duty to keep the stream of Contentnea *369 Creek open and free and not to obstruct the flow of the waters of the creek in a manner that would elevate the water table or flood the plaintiffs' work area.
7. Soon after the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., had entered into the contract with the defendant, the plaintiffs undertook to perform the contract and plaintiffs have completed the contract except such portions thereof as they have been precluded from completing by the wrongful acts of the defendant as hereinafter set forth.
The defendant has not paid the plaintiffs the sum agreed to be paid for their work under the contract; and the defendant notified the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., on June 29, 1977 that it was refusing payment to the plaintiffs for the balance of the contract as revised.
8. In the early stages of the plaintiffs' work in the performance of their contract with the defendant, the defendant caused, authorized, or allowed Contentnea Creek to be dammed up and the natural flow thereof obstructed and the stream of the creek diverted into an artificial or diversion channel.
The diversion channel through which the stream of Contentnea Creek was diverted was adjacent to the dam site and downstream from the plaintiffs' construction area. The said artificial or diversion channel was constructed in such a manner as to obstruct the flow of the waters of Contentnea Creek, raise the water table, and at times flood the plaintiffs' construction area.
The said diversion channel in the manner it was authorized, permitted, and constructed obstructed the flow of the waters of Contentnea Creek, precluded the drainage of the plaintiffs' construction area, raised the water table in the plaintiffs' construction area, and at times caused extensive flooding in the plaintiffs' construction area, all in violation of the rights of the plaintiffs and in breach of the duties that the defendant owed to the plaintiffs under the circumstances of the parties and the contract between them.
9. The aforesaid diversion channel that the defendant caused, authorized or allowed to be constructed to carry the flow of the waters of the stream of Contentnea Creek was either inadequately designed or improperly constructed. The manner in which it was designed and constructed caused the waters of Contentnea Creek to be impeded and backed up to the great damage of the plaintiffs in the carrying on of their work in the plaintiffs' construction area.
The said diversion channel was of insufficient width and debth and was constructed with excessive angularity so that it was not adequate to carry the flow of the waters of Contentnea Creek without causing the water flow to be impeded, backed up and to accumulate in the plaintiffs' construction work area where plaintiffs were attempting to perform their work under their contract with the defendant.
10. The elevation of the water table in the plaintiffs' construction area and the partial flooding of the same after the construction of the aforesaid diversion channel persisted in varying degrees throughout the remainder of the plaintiffs' work under their contract with the defendant. These conditions made the plaintiffs' performance of their contract with the defendant more difficult, time-consuming and costly.
The raising of the water table in the plaintiffs' construction area by the defendant by the manner it authorized, permitted, and allowed the said diversion channel to be constructed was a breach of duties owed the plaintiffs by the defendant and was a constructive change in the constract between the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., and the defendant.
11. That as a direct and proximate result of the defendant's breach of duty owed to the plaintiffs and the defendant's constructive change of its contract with the plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., the plaintiffs sustained direct increases in the cost to complete their contract in the amount of SEVEN HUNDRED FOUR THOUSAND, ONE HUNDRED, FOURTEEN AND NO/100 DOLLARS ($704,114.00).
*370 12. The defendant has refused to pay the plaintiffs the remaining sums owed them under the contract as revised and after notice has denied plaintiffs' claim for damages that is the subject of this action.
On July 1, 1977 plaintiff, ASHEVILLE CONTRACTING COMPANY, INC., made formal demand on the defendant, THE CITY OF WILSON, for payment of the claim sued on in this action and the defendant has denied the same and refused to pay the plaintiffs' claim.
13. That as a direct and proximate cause of the defendant's breach of its duties to the plaintiffs, the plaintiffs have been damaged in the sum of SEVEN HUNDRED TWENTY THOUSAND, NINE AND 68/100 DOLLARS ($720,009.68).
Wilson's forecast of the evidence showed, in part, the following. On 1 November 1974, plaintiff Asheville Contracting and defendant City entered into a written agreement that provided, in pertinent part, as follows.
This agreement, made this the 1st day of November 1974, between The City of Wilson ..., "Owner," and Asheville Contracting Company, Inc. ..., "Contractor,".
WITNESSETH: That for and in consideration of the payments and agreements hereinafter mentioned, to be made and performed by the Owner, the Contractor hereby agrees with the Owner to commence and complete:
Buckhorn ReservoirClearing and Grubbing hereinafter called the project, for the sum of Two Hundred & Forty-Eight Thousand dollars ($248,000.00) and all extra work in connection therewith, under the terms as stated in the General and Special Conditions of the Contract; and at its own proper cost and expense to furnish all the materials, supplies, machinery, equipment, tools, superintendence, labor, insurance, and other accessories and services necessary to complete the said project in accordance with the conditions and prices stated in the Proposal, the General Conditions and Special Conditions of the Contract, the plans, which include all maps, plats, blue prints, and other drawings and printed or written explanatory matter thereof, the specifications and contract documents therefor as prepared by L.E. Wooten and Company, herein entitled the Engineer, and as enumerated in the Special Conditions, all of which are made a part hereof and collectively evidence and constitute the contract.
The Contractor hereby agrees to commence work under this contract on or before a date to be specified in a written "Notice to Proceed" of the Owner and to fully complete the project within 450 consecutive calendar days thereafter. The Contractor further agrees to pay, as liquidated damages, the sum of $100.00 for each consecutive calendar day thereafter as hereinafter provided in Paragraph titled "Time of Completion" of the General Conditions.
The Owner agrees to pay the Contractor in current funds for the performance of the contract, subject to additions and deductions, as provided in the General Conditions of the Contract, and to make payments on account thereof as provided in Paragraph titled "Payments to Contractor," of the general conditions.
The General Conditions of the contract contained the following.
Section 2.2 Definitions.


. . . . .
(b) "Subcontractor": A person, firm or corporation supplying labor and materials or only labor for work at the site of the project for, and under separate contract or agreement with, the Contractor.

. . . . .
Section 2.12 Weather Conditions.

In the event of temporary suspension of work, or during inclement weather, or whenever the Engineer shall direct, the Contractor will, and will cause his subcontractors to protect carefully his and their work and materials against damage or injury from the weather. If, in the opinion of the Engineer, any work or materials shall have been damaged or injured by *371 reason of failure on the part of the Contractor or any of his subcontractors so to protect his work, such materials shall be removed and replaced at the expense of the Contractor.

. . . . .
Section 2.18 Extras.

Without invalidating the contract, the Engineer may order extra work or make changes by altering, adding to or deducting from the work, the contract sum being adjusted accordingly, and the consent of the Surety being first obtained where necessary or desirable. All the work of the kind bid upon shall be paid for at the price stipulated in the proposal, and no claims for any extra work or materials shall be allowed unless the work is ordered in writing by the Engineer, acting officially for the Owner, and the price is stated in such order.
Section 2.19 Time for Completion and Liquidated Damages.


. . . . .
(b) The Contractor agrees that said work shall be prosecuted regularly, diligently, and uninterruptedly at such rate of progress as will insure full completion thereof within the time specified. It is expressly understood and agreed, by and between the Contractor and the Owner, that the time for the completion of the work described herein is a reasonable time for the completion of the same, taking into consideration the average climatic range and usual industrial conditions prevailing in this locality.

. . . . .
(e) It is further agreed that time is of the essence of each and every portion of this contract and of the specifications wherein a definite and certain length of time is fixed for the performance of any act whatsoever; and where under the contract an additional time is allowed for the completion of any work, the new time limit fixed by such extension shall be of the essence of this contract. Provided, that the Contractor shall not be charged with liquidated damages or any excess cost when the delay in completion of the work is due:

. . . . .
(2) To unforeseeable cause beyond the control and without the fault or negligence of the Contractor, including, but not restricted to, acts of God, or of the public enemy, acts of the Owner, acts of another Contractor in the performance of a contract with the Owner, fires, floods, epidemics, quarantine restrictions, strikes, freight embargoes, and unusually sever weather.

. . . . .

Provided, further, that the Contractor shall, within ten (10) days from the beginning of such delay, unless the Owner shall grant a further period of time prior to the date of final settlement of the contract, notify the Owner, in writing, of the causes of the delay, who shall ascertain the facts and extent of the delay and notify the Contractor within a reasonable time of its decision in the matter.

. . . . .
Section 2.22 Claims for Extra Costs.

No claim for extra work or cost shall be allowed unless the same was done in pursuance of a written order of the Engineer approved by the Owner, as aforesaid, and the claim presented with the first estimate after the changed or extra work is done....

. . . . .
Section 2.31 Assignments.

The Contractor shall not assign the whole or any part of this contract or any moneys due or to become due hereunder without written consent of the Owner. . . .

. . . . .
Section 2.34 Subcontracting.


. . . . .
(b) The Contractor shall not award any work to any subcontractor without prior written approval of the Owner, which approval will not be given until the Contractor submits to the Owner a written statement concerning the proposed award *372 to the subcontractor, which statement shall contain such information as the Owner may require.
(c) The Contractor shall be as fully responsible to the Owner for the acts and omissions of his subcontractors, and of persons either directly or indirectly employed by them, as he is for the acts and omissions of persons directly employed by him.
(d) The Contractor shall cause appropriate provisions to be inserted in all subcontracts relative to the work to bind subcontractors to the Contractor by the terms of the General Conditions and other contract documents insofar as applicable to the work of subcontractors and to give the Contractor the same power as regards terminating any subcontract that the Owner may exercise over the Contractor under any provision of the contract documents.
(e) Nothing contained in this contract shall create any contractual relation between any subcontractor and the Owner.
Wilson offered the affidavit of J.M. Wells, Jr., a custodian of records for the North Carolina Licensing Board for General Contractors. Mr. Wells stated that Taylor was not licensed as a general contractor in North Carolina during the time period pertinent to this case except for between 22 May 1975 and 31 December 1975.
Defendant's finance officer Charles W. Pittman's affidavit showed that while Wilson had notice that Taylor had possibly furnished personnel on the project, that Wilson made all the payments for work performed to Asheville; that Wilson had not been notified that any part of the work had been subcontracted to Taylor; and that William B. Taylor, the president of Taylor and a vice-president of Asheville, had corresponded with the City with regard to the project in his capacity as vice-president for Asheville. Attached to Pittman's affidavit was an invoice from Asheville to Wilson dated 29 September 1975, as follows:
PROGRESS ESTIMATE NO. FIFTEEN, BUCKHORN DAM AND RESERVOIR CLEARING AND GRUBBING, FOR PERIOD ENDING SEPTEMBER 20, 1976, WILSON, N.C.


Total Contract Price                          $248,000.00
Extra Clearing & Grubbing Work,
807-710 = 97 Acres @ 321.00 =                   31,137.00
                                                _________
Total Revised Contract Price                  $279,137.00
Total Amount Due Based on Project
Being
99.5% Complete = 99.5% X
$279,137.00 =                                 277,741.32
Less Previous Payments                        245,640.56
                                              __________
Amount Not Paid                              $ 32,100.76

Defendant also presented the affidavit of Marl Ray, an employee of L.E. Wooten, the City's consulting engineer. Ray stated that the City gave Asheville notice to begin work on 30 December 1974, that work was actually commenced on or about that date, that all correspondence concerning the project was with Asheville, and that the performance bond and payment bond on the project was in the name of Asheville.
Plaintiffs offered the affidavit of William B. Taylor, president of Taylor, and a vice-president for Asheville. Taylor stated that in bidding on the project, he submitted two bids: one in the name of Taylor for $247,500.00 and one in the name of Asheville for $248,000.00. This was done because Mr. Ray of L.E. Wooten and Company had informed Mr. Taylor that Taylor's bid may not be accepted because Taylor was not licensed in North Carolina as a general contractor. The bid of Asheville was accepted and Asheville and the City entered into the contract. Mr. Taylor's affidavit further tended to show that L.E. Wooten and Company and the City were aware that Taylor was performing the work. According to Mr. Taylor, there was an "understanding or agreement" between Taylor and Asheville that Taylor would do all the work and make all profits or sustain all losses in connection with the job. Asheville's only function was to receive payments from the City and turn them over to Taylor.
Defendant deposed Taylor and the deposition was before Judge Brown. Taylor testified that the work was done by Taylor Contracting in the name of Asheville Contracting. Taylor further testified that Taylor had no subcontract with Asheville, but *373 that Taylor performed the work as if the job was Taylor's, and that all payments eventually went to Taylor.

Asheville's Claim.
Under general principles of the law of torts, a breach of contract does not in and of itself provide the basis for liability in tort. Ordinarily, an action in tort must be grounded on a violation of a duty imposed by operation of law, and the right invaded must be one that the law provides without regard to the contractual relationship of the parties, rather than one based on an agreement between the parties. See 86 C.J.S. Torts, Secs. 1-3; see also Pinnex v. Toomey, 242 N.C. 358, 87 S.E.2d 893 (1955).
The allegations in plaintiffs' complaint and the materials before the trial court clearly show that Asheville's claim is for Wilson's failure to keep the work site free of flooding and for Asheville's damages caused by such failure. While we may assume, but need not decide in this case, that Wilson had an implied duty to Asheville to keep the job site open and available to Asheville, such a duty arose under the contract, not by operation of law independent of the contract, and the asserted breach of such duty by Wilson does not give rise to an action in tort. Compare Ports Authority v. Roofing Co., 294 N.C. 73, 240 S.E.2d 345 (1978).

Taylor's Claim.
The materials before the trial court clearly show that Taylor's rights, if any, against Wilson are limited to the same degree as Asheville's. At most, the arrangement between Asheville and Taylor was an attempt to substitute Taylor for Asheville's duties and obligations under the contract, and Taylor had no rights as to Wilson independent of the contract. Wilson's duties, if any, to Taylor were limited to those contemplated under the contract.
Plaintiffs' own forecast of evidence shows that plaintiffs' asserted claims in tort against defendant City of Wilson are unfounded and cannot be supported. Lowe v. Bradford, supra, and therefore, summary judgment entered by Judge Brown as to plaintiffs' tort claims must be affirmed.
Affirmed.
BECTON and EAGLES, JJ., concur.
