Plaintiff Salt Lake County, for itself and other water customers of Salt Lake City living outside the city limits in Salt Lake County, sought a declaratory judgment as to: (1) whether the city can arbitrarily and unilaterally terminate their water supply without notice, or hearing, or any action thereon by the City Commission; (2) whether the city’s distribution system in Salt Lake County is so extensive that it should be deemed to be in that business and subject to regulation by the Public Service Commission; and (3) whether the city’s rate structure is unreasonable and discriminatory-
Salt Lake City operates its own water system. In addition to serving the upwards of 40,000 outlets within the city, it serves from its surplus water upwards of 17,000 customers outside of the city limits.1 This includes water furnished to Salt Lake County for use in its parks, golf courses, fire stations and other facilities operated by the county. In its complaint the County alleges that as such a customer it is a member of a large class of such customers and alleges that the City has threatened to unilaterally terminate water service to them without notice or hearing thereon and alleges that this threat constitutes a hazard to their health and well-being, wherefore it seeks an adjudication upon the propositions stated above for itself and on behalf of others similarly situated.
The defendant’s position is that it has no statutory, contractual or any other obligation to furnish water to the plaintiff Salt Lake County and other users therein; and further, that even if it does, there has been no decrease in or termination of the supplying of such water, hence, they have suffered no damage or disadvantage and there is, therefore, no controversy, real or potential, to justify a declaratory judgment. On that ground, the city moved to dismiss the complaint for failure to state a cause for declaratory relief. On the basis of the pleadings, memoranda, and arguments presented to the trial judge, he announced that upon the facts thus represented, he would treat the defendant’s motion to dismiss as one for summary judgment, and rendered judgment against the plaintiff, from which the latter appeals.
The purpose of the creation of the declaratory judgment procedure was to avoid the difficulties of the common-law rule that rights would not be adjudicated by a court unless there had been a violation for which relief could be granted;2 and to provide a means for résolving uncertainties and controversies before trouble has developed or harm has occurred, and in order to *121avoid future litigation.3 However, this does not go so far as to require courts to become involved in the adjudication of moot or abstract questions,4 nor as is sometimes stated, to furnish a fishpond for judicial legal advice.5
For those reasons there must be a genuine justiciable controversy in that (1) the interests of the parties involved are adverse, (2) the party seeking relief must have, or assert a bona fide claim, of a legally protectable interest therein, and (3) the issues must be ripe for judicial determination.6 That is, it must appear either that there is actual controversy, or that there is a substantial likelihood that one will develop so that the adjudication will serve a useful purpose in resolving or avoiding controversy or possible litigation.
Our statute provides that the Declaratory Judgment Act “. . . is to be liberally construed and administered” for the just stated purpose.7 In harmony therewith, the rule is that the court will be indulgent in entertaining actions brought to achieve that objective;8 and more particularly so, where there is a substantial public interest to be served by the settlement of such an issue.9
Reverting to the issues posed by the plaintiff, these fundamental facts are to be reckoned with: Inasmuch as Salt Lake County and many thousands of its residents are dependent upon the city water for their very existence, conceivably, great difficulty could result from an abrupt termination of that service without notice.
The building of homes and the development of subdivisions and business areas moves on apace. It is our opinion that under the facts alleged and the charges asserted by Salt Lake County, the criteria relating to declaratory judgment are met; and that in order to relieve uncertainty and insecurity and to avoid possible controversy and harm, it is necessary and desirable that those officials charged with the responsibility of its government, and also those depending on such services, should have an authoritative adjudication as to what their rights are; and equally important, what their rights are not.
In view of our remand and the duty of this court to comment on issues that may be involved, we make some tentative observations.10
On the first issue: plaintiff Salt Lake County does not contend that either itself or other users in the County have any formal contract with the City to furnish them water. Accordingly, insofar as we are able to see, the City is correct in its contention that it has no binding obligation to serve them. But in view of the nature and vital importance to those involved, both users within the city, and in the county, it would seem advisable that there be either some clearer understanding or some contractual arrangement defining mutual rights and obligations.
On the second issue: the city is also correct in its assertion that, inasmuch as its authority and responsibility to furnish water to its residents derives from our Constitution, its business in furnishing water to its residents and activities reasonably inci-
*122dental thereto, is not subject to regulation by the Public Service Commission.11 But to just however great an extent a city may engage in rendering a utility service outside its city limits without being subject to some public regulation is not so clearly determined.
On the third issue: we can see no reason why plaintiff should not be given an opportunity to present its evidence and have an adjudication upon its claim that the rates charged by the city for water are unreasonable and discriminatory.
We further direct attention to the argument of the plaintiff as the procedural impropriety of the trial court treating the motion to dismiss as one for summary judgment. It would be noted that Rule 12(b), U.R.C.P., contemplates that this be done when such a motion is made on the basis of the pleadings and “matters outside the pleadings,” i. e. affidavits, depositions, or other submissions which have some guaranties of trustworthiness.12 However, it is also undoubtedly true that in such circumstances, if it appears without question that there is no dispute as to issues of material fact, the court may treat such a motion as one for summary judgment.13 Nevertheless, we take occasion to observe that this should be done only with great caution;14 and that it is generally not well advised to treat a motion to dismiss as one for summary judgment.15
On the basis of what has been said herein it is our conclusion that the granting of the motion for summary judgment was improper. It is therefore necessary that it be vacated and the cause remanded for further proceedings.
No costs awarded.
MAUGHAN and HALL, JJ., concur. WILKINS, J., concurs in the result.. As permitted by Sec. 10-8-14, U.C.A.1953.
. E. g., DeCharett v. St, Matthews Bank and T. Co., 214 Ky. 400, 283 S.W. 410, 50 A.L.R. 34; 22 Am.Jur. 2d 841.
. Ibid. Citing other cases.
. Anderson, Declaratory Judgments, Section 8.
. Lide v. Mears, 231 N.C. Ill, 56 S.E.2d 404.
. Lyon v. Bateman, 119 Utah 434, 228 P.2d 818 (1951).
. 78-33-12, U.C.A., 1953. See Reid v. Anderson, 116 Utah 455, 211 P.2d 206 (1949).
. Whitmore v. Murray City, 107 Utah 445, 154 P.2d 748 (1944); Gray v. Defa, 103 Utah 339, 135 P.2d 251 (1943).
. State ex rel. Miller v. State Board of Education, 56 Idaho 210, 52 P.2d 141 (1935); 1 Anderson, Actions for Declaratory Judgments, Sec. 63 (1951); Borchard, Declaratory Judgments, p. 32 (2d ed. 1941).
. Where it is necessary to remand a case for further proceedings, it is the duty of the reviewing court to pass on matters which might become material. See Rule 76(a), U.R.C.P.; LeGrand Johnson Corporation v. Peterson, 18 Utah 2d 260, 420 P.2d 615 (1966).
. See City of St. George v. Public Service Comm., Utah, 565 P.2d 72 (1977).
. Sardo v. McGrath, 90 U.S.App.D.C. 195, 196 F.2d 20 (1952).
. Rule 12(b), U.R.C.P.; Harvey v. Sanders, Utah, 534 P.2d 905 (1975).
. Watkins v. Simonds, 11 Utah 2d 46, 354 P.2d 852 (1960); Dupler v. Yates, 10 Utah 2d 251, 351 P.2d 624 (1960).
.See Harvey v. Sanders, supra note 13; Richardson v. Rivers, 118 U.S.App.D.C. 333, 335 F.2d 996 (1964); P. & J. Auto Body v. Miller, 72 N.J.Super. 207, 178 A.2d 237 (1962).