
425 P.2d 59 (1967)
STATE HIGHWAY COMMISSION of Wyoming, Appellant (Defendant below),
v.
C. D. BOURNE, d/b/a Sheet Metal Products Company, Appellee (Plaintiff below).
No. 3534
Supreme Court of Wyoming.
March 16, 1967.
*61 John F. Raper, Atty. Gen., Glenn A. Williams, Asst. Deputy Atty. Gen., J. Richard Plumb, Asst. Atty. Gen., Cheyenne, for appellant.
Richard F. Pickett of Loomis, Lazear, Wilson & Pickett, Cheyenne, for appellee.
Before PARKER, C.J., and HARNSBERGER, GRAY and McINTYRE, JJ.
Mr. Justice GRAY delivered the opinion of the court.
Plaintiff, C.D. Bourne d/b/a Sheet Metal Products Company, brought action against the defendant, State Highway Commission of Wyoming, to recover for material and services furnished in the repair of a roof on the office building owned and occupied by the defendant. The defendant, on the day preceding the filing of its answer, filed a third-party complaint against Spiegelberg Lumber and Building Company, a contractor; against Sam C. Hutchings, an architect; and against Ruberoid Company, a foreign corporation, a furnisher of roofing material.[1] In brief, the litigation grows out of the installation of a defective roof in the construction of the commission's new building and each of the third-party defendants, as well as Bourne, were in some fashion involved in that construction. The commission denied that it was indebted to Bourne but claimed that if it was, all of the third-party defendants are "or may be liable to him [it] for all or part of the plaintiff's [Bourne's] claim against him [it]." Rule 14(a), W.R.C.P. Approximately two and one-half years after the third-party complaints were filed and served, Bourne filed a motion to vacate the order of the court granting leave to the commission to serve summons and complaints on the third-party defendants[2] and to dismiss the complaints on the ground that said complaints failed to state facts upon *62 which relief could be granted. The trial court thereupon granted Bourne's motion, proceeded shortly thereafter with the trial of the action on Bourne's initial complaint and the commission's amended answer thereto, and entered judgment for Bourne against the commission in the sum of $15,545.82 plus interest and costs. From that judgment the commission appeals.
Several claimed errors of the trial court have been advanced by the commission, but its principal argument is directed at the order dismissing the third-party complaints. In essence the commission contends that the action of the trial court constituted an abuse of discretion under the circumstances then existing. After careful analysis of the record we have concluded that the contention is sound and that such error was prejudicial. Inasmuch as the case will be returned for further proceedings below, we deem it inadvisable to consider the other claimed errors and our discussion here will be understood as relating to the procedural questions.
In passing upon the merits of Bourne's motion to dismiss, we have been somewhat bothered by the timeliness of the filing of the motion; the utilization of such a motion on the state of the pleadings then existing[3]; and the assertion that the third-party complaints failed to state "any facts upon which third-party defendants are or may be liable to defendant for all or part of plaintiff's claim against defendant." Nevertheless, the commission in its brief and in its argument has not raised these points and for that reason we shall proceed to consider the motion as simply a motion to dismiss the third-party complaints for failure to state a claim upon which relief could be granted, which apparently was the view taken by the trial court.
The basis of Bourne's motion was in substance that his claim was based on a separate and distinct transaction between himself and the commission; that no other person has or had any connection whatsoever with the subject matter of his claim or any interest in the result; that the third-party defendants are strangers to the transaction and have no privity with him or the commission; and that such defendants could offer nothing by way of defense or evidence which would or could affect the outcome of his claim. In the foregoing it will be noticed that the motion is not directed at the infraction of the procedural rule above mentioned and neither is it advanced that the commission as a matter of substantive law was not entitled to indemnity from one or more of the third-party defendants on the theory advanced by its complaints. In view of the fact that the trial court did not state the basis for granting the motion, we assume it was based upon one or more of the grounds asserted by Bourne.
While we can agree, as Bourne contends, that the trial court is vested with a broad discretion in passing upon such a motion, Noland Company v. Graver Tank & Manufacturing Company, 4 Cir., 301 F.2d 43, 50, it is also well recognized that if it acts under an erroneous theory or otherwise abuses its discretion the case will be returned for further consideration. Southern Railway Company v. Fox, 5 Cir., 339 F.2d 560, 563; Duke v. Reconstruction Finance Corp., 4 Cir., 209 F.2d 204, 208, *63 certiorari denied 347 U.S. 966, 74 S.Ct. 777, 98 L.Ed. 1108; Masters v. Hart, 189 Va. 969, 55 S.E.2d 205, 209. Also, for purposes of the motion, the well-pleaded facts in the third-party complaints must be taken as true, Keller Crescent Printing and Engraving Company v. Rosen, D.C.Pa., 135 F. Supp. 22, 23; State Public School Building Authority v. Tectum Corporation, D.C.Pa., 221 F. Supp. 308, 312; Lane v. Celanese Corp. of America, D.C.N.Y., 94 F. Supp. 528, 530; Behar v. Savard, D.C.N.Y., 21 F.R.D. 367, 370; and while it is essential that the third-party plaintiff must make some showing that entitles him to recover over against the third-party defendants, it is not required that he do so to an absolute certainty. Choate v. United States, D.C.Okla., 233 F. Supp. 463, 464; State Public School Building Authority v. Tectum Corporation, supra, 221 F. Supp. at 311; Concordia College Corp. v. Great American Ins. Co., D.C.Minn., 14 F.R.D. 403, 406; 3 Moore's Federal Practice, § 14.10, pp. 554, 555 (2d. Ed.). It has also been said by way of general authority:
"A motion to dismiss a complaint for failure to state a claim on which relief can be granted admits the facts alleged in the complaint but challenges the plaintiff's right to relief.
"Motions to dismiss are sparingly granted and only if the averments in the pleading attacked disclose with certainty the impossibility of proving a claim upon which relief can be granted. If doubts may be dispelled by amendment, the court should permit the pleading to be amended. The allegations of the complaint must be viewed in a light most favorable to plaintiff, admitting and accepting as true all facts well pleaded." 1A Barron and Holtzoff, Federal Practice and Procedure, § 350, pp. 321-323 (1960).
Attention is also called to what was recently said in our own case of In re Big Bend Drainage District, Wyo., 418 P.2d 784, 789:
"* * * [I]nasmuch as the counterclaim was dismissed for failure to state a claim on which relief could be granted, leave should have been given to amend unless the court determined that the allegation of other facts consistent with the challenged pleading could not possibly cure the deficiency. Bonanno v. Thomas, 9 Cir., 309 F.2d 320, 322; and see Sidebotham v. Robison, 9 Cir., 216 F.2d 816, 826. The record does not reflect that the trial court made such a determination. As it was well said by Judge Hamley in Bonanno v. Thomas, 9 Cir., 309 F.2d 320, 322, `Where a complaint is dismissed on the ground that it fails to state a claim, the order should also inform the plaintiff of the reason for dismissal so that he can make an intelligent choice as to amending.' * * *"
In testing the propriety of dismissing the commission's third-party claims under the foregoing legal principles, some analysis of the complaints is necessary. In the complaint against Spiegelberg the commission alleged in substance that it had entered into a contract with Spiegelberg as the prime contractor in August 1957 for construction of the building in question; that the commission agreed to pay and did pay the approximate sum of $1,800,000 for the completed structure; that Spiegelberg subcontracted with Bourne to lay the specified roofing on said building; that in May 1960 the roof began to leak and certain minor repairs were made; that such repairs did not correct the roof leakage and in the spring of 1962 major repairs were made by Bourne; that the commission relied upon the integrity and ability of Bourne and Spiegelberg to build and construct the roof in a workmanlike manner and in accordance with the specifications of the contract; that due to the carelessness and inefficiency of both, the roof was not satisfactorily constructed, all to the damage of the commission. The complaint against Hutchings alleged that an agreement had been entered into between Hutchings and the commission whereby Hutchings was to design and prepare specifications for the construction of the building and to oversee, supervise, *64 and accept or reject any and all construction done on said building; that the specifications prescribed that an asphaltic preparation manufactured by Ruberoid be used in the roofing; that the roof, along with the rest of the building, was completed in August 1958 and accepted by Hutchings; that the roof was not in fact constructed properly or adequately and that Hutchings wrongfully accepted said roof; that the commission relied upon the integrity and ability of Hutchings to perform, but due to his carelessness and inefficiency in accepting the roof the commission was damaged thereby. The complaint against Ruberoid alleged that Ruberoid had warranted its products for a period of 20 years and had bonded said roof; that the materials furnished by Ruberoid were in fact substandard in quality and as a result the roof began to leak; that the commission relied upon the warranty of Ruberoid and as a result of the faulty materials furnished the commission was injured thereby. In each instance the prayer was for whatever sum might be adjudged against the commission in favor of Bourne.
It may be true that the complaints are not without some imperfections. Nevertheless, when viewed liberally, we think sufficient facts were alleged to meet and overcome Bourne's contention that the commission's third-party claims and his claim were wholly unrelated and did not grow out of the same transaction or occurrence. If there was a deficiency in that respect it has not been pointed out to our satisfaction. The difficulty with Bourne's position, as we view it, is simply that he was desirous of litigating his claim without the inconvenience and complications of the presence of the third-party defendants. To subscribe to that philosophy would in most cases thwart the very spirit and purpose of Rule 14(a), W.R.C.P.
The primary purpose of the rule is to avoid circuity of action, multiplicity of suits, and to reach consistent results. 3 Moore's Federal Practice, § 14.04, p. 501 (2d Ed.). United States v. Acord, 10 Cir., 209 F.2d 709, 712, certiorari denied 347 U.S. 975, 74 S.Ct. 786, 98 L.Ed. 1115, states the purpose in this language:
"* * * The purpose of Rule 14 was to accomplish in one proceeding the adjudication of the rights of all persons concerned in the controversy and to prevent the necessity of trying several related claims in different lawsuits. The rule should be liberally construed to effectuate its intended purposes."
There may be situations, of course, where complication of the issues to be tried might possibly outweigh the benefits, Concordia College Corp. v. Great American Ins. Co., D.C.Minn., 14 F.R.D. 403, 405. But even then there is to be considered the right of any party under the rule to move for severance or separate trial.
In any event, we think the circumstances here were such that the order of dismissal was unwarranted. The position of the commission was clear throughout that it had contracted and paid for a new structure which through no fault of its own was topped by a partially defective roof. Bourne and the third-party defendants were not strangers to the laying of that roof. Each was shown by the complaints to have played a part in it. What the commission was seeking by the third-party procedure was to have the court determine the responsibility for the defect and to fix the liability accordingly. That is not to say, of course, that the commission could prove its claims, but at least it was entitled to try.
That the commission was prejudiced by the order of dismissal is scarcely open to doubt. At that time there was pending the defense and cross-claim of Spiegelberg to Bourne's claim asserting that the repair which Bourne made was necessitated by his own fault and neglect in the initial construction and that pleading had not been attacked by Bourne in any way. Had the commission's complaint against Spiegelberg not been dismissed and had Spiegelberg succeeded in its defense against Bourne's action, it would follow that Bourne's claim against the commission *65 as made out by his complaint would also fail. Newton v. New York Life Insurance Company, D.C.Cal., 210 F. Supp. 859, 860, reversed on other grounds 9 Cir., 325 F.2d 498; M.V.M., Inc., v. St. Paul Fire and Marine Insurance Company, D.C.N.Y., 20 F.R.D. 296, 297. Further than this the commission in the trial of the case was not permitted even to inquire into the cause that necessitated the repair.
In the foregoing we have refrained from making reference to any evidence at the trial that bears upon the procedural question for the reason that much of it was not before the trial court at the time its ruling was made. Nevertheless, we have carefuly reviewed it and it illustrates the confusion that resulted from the absence of the third-party defendants. It but strengthens our view that the controversy here was admirably suited to the third-party procedure prescribed by Rule 14(a), W.R.C.P.
One further matter requires our attention. We mentioned above that Spiegelberg had answered and cross-claimed prior to Bourne's motion. Hutchings had also answered, which in substance was a denial of the defaults charged against him by the commission. Both were in the thick of the fray, so to speak, at the time the order of dismissal was entered and both were vitally interested in the outcome of Bourne's claim against the commission. Knell v. Feltman, 85 U.S.App.D.C. 22, 174 F.2d 662, 665; American Export Lines, Inc., v. Revel, 4 Cir., 262 F.2d 122, 126, 266 F.2d 82; Wiggins v. City of Philadelphia, 3 Cir., 331 F.2d 521, 529.
The status of Ruberoid in the proceeding is however, left in some doubt. It filed no answer but instead filed a motion to dismiss the complaint or in lieu thereof to quash the return of service of summons on the grounds that the service was made without leave of the trial court; that it was not served with process as required by law; and that it was a foreign corporation not doing or qualified to do business in the state and was therefore not subject to process in the state. In addition to this a cross-claim was also filed against Ruberoid by Spiegelberg and in response Ruberoid filed a motion to dismiss, asserting that the court was without jurisdiction of the subject matter and jurisdiction over its person for the reasons set forth in its previous motion, and further on the ground that the cross-claim failed to state a claim upon which relief could be granted. The record does not disclose that these motions were ever actually heard or that any factual support for or against the motions by way of evidence or affidavits was ever presented on the jurisdictional questions. Nevertheless, the trial court in its order dismissing the third-party complaints dismissed the cross-claim of Spiegelberg and at the same time overruled the motions of Ruberoid. Ruberoid is not here complaining of the overruling of its motions, but in view of the return of the case for further proceedings below it is proper that we make some comment.
With respect to the failure of the commission to obtain leave of court to serve the summons and complaint as then required by Rule 14(a), W.R.C.P., it is true, of course, that the trial court was free to enforce the procedural rule. That was not done, however, and since that rule has now been amended and since the case is now being returned for the further consideration of the trial court, little would seem to be accomplished by requiring the commission to take a new start, if it so desires, against Ruberoid. We fail to see how Ruberoid can be prejudiced in that respect. The attack made on the court's jurisdiction, however, must and should be resolved rather promptly. Keeping in mind the teachings of Ford Motor Company v. Arguello, Wyo., 382 P.2d 886, 897, the parties should be afforded an opportunity to make whatever showing they might deem necessary in order that the trial court be fully informed in the premises before making its ruling.
*66 The judgment will be reversed and the cause remanded for further proceedings in accordance with this opinion.
Reversed and remanded.
HARNSBERGER, Justice (dissenting).
I cannot concur in the majority opinion.
The opinion is based solely in the premise that the trial court abused its discretion in dismissing from the action the parties against whom the defendant filed its third-party complaint without giving any substantiation for that conclusion other than the speculative assumption that the State Highway Commission might have a cause of action growing out of the malconstruction of the roof of its building upon which plaintiff had laid covering material, although plaintiff's work was performed in accordance with specification for its kind and quality and in a manner deemed and pronounced satisfactory by the commission's agent, the architect, who accepted Bourne's workmanship as proper and satisfactory, and for which the commission paid Bourne without complaint. The majority unjustifiably labels the installation of the roof covering as having been laid defectively. Whether this speculation of this court is intended to characterize the construction of that part of the roof over which the covering was installed by Bourne as defective, or is intended to mean the covering material was defective, or is intended to infer the Bourne workmanship in laying the roof covering was defective, is left uncertain. However, if the latter was intended, the court's conclusion is contradicted by the fact that Bourne's workmanship was pronounced satisfactory and accepted as such by the commission's own agents and representative more than two years before Bourne's instant cause of action arose.
The dismissal of the third-party defendants carried with it a finding that as a matter of fact they were unnecessary parties for the determination of Bourne's right to compensation for his accepted workmanship, and this court is without legal authority to substitute any conclusion other than that which moved the trial court to dismiss the third-party defendants.
The remand for further proceedings results in a grave injustice for which no remedy is available to Bourne as it further improperly delays payment of a considerable sum of money to a small contractor who can ill afford to wait longer for his compensation.
The judgment of the lower court should be affirmed.
NOTES
[1]  For convenience we will hereafter refer to plaintiff as "Bourne", to the defendant and third-party plaintiff as the "commission"; to the third-party defendants as "Spiegelberg," as "Hutchings," and as "Ruberoid."
[2]  No formal order to that effect is reflected by the record as was then required by Rule 14(a), W.R.C.P. In the meantime, however, and prior to the date the motion was filed, the rule had been amended to permit the third-party plaintiff to file and serve a third-party complaint as a matter of right if done "not later than ten days after he serves his original answer."
[3]  Spiegelberg, for example, had previously answered the third-party complaint and among other things had denied that Bourne's claim was of merit; alleged the repair which Bourne made was necessitated by his fault and neglect; and by way of cross-claim against Bourne alleged that if the commission was damaged in the manner claimed such damage was the result of the carelessness, inefficiency, lack of skill and quality of workmanship on the part of Bourne in the performance of his subcontract. The prayer was for judgment against Bourne for the amount of any judgment that might be rendered against it on the commission's claim. Bourne answered the cross-claim by way of a general denial. In this connection see Rule 12(h), W.R.C.P.; United States, for Use of E.E. Black Limited, v. Price-McNemar Construction Co., 9 Cir., 320 F.2d 663, 664.
