
670 N.W.2d 319 (2003)
266 Neb. 882
K N ENERGY, INC., a division of Kinder Morgan, Inc., Appellee,
v.
CITIES OF ALLIANCE and OSHKOSH, municipal corporations of the State of Nebraska, Appellants.
K N Energy, Inc., a division of Kinder Morgan, Inc., Appellee,
v.
Cities of Kimball et al. and Village of Gurley, municipal corporations of the State of Nebraska, Appellants.
K N Energy, Inc., a division of Kinder Morgan, Inc., Appellee,
v.
Village of Hemingford and Cities of Gordon and Chadron, municipal corporations of the State of Nebraska, Appellants.
Nos. S-01-1031, S-01-1032, S-01-1033.
Supreme Court of Nebraska.
October 24, 2003.
*320 David A. Hecker and Norman M. Krivosha, of Kutak Rock, L.L.P., Lincoln, for appellants.
M.J. Bruckner, Lincoln, of Bruckner Fowles Law Firm, P.C., Stephen M. Bruckner, Omaha, of Fraser, Stryker, Meusey, Olson, Boyer & Bloch, P.C., and B.J. Becker and William M. Lopez, of Kinder Morgan, Inc., for appellee.
WRIGHT, GERRARD, STEPHAN, McCORMACK, and MILLER-LERMAN, JJ.
McCORMACK, J.

NATURE OF CASE
K N Energy, Inc. (KNE), a division of Kinder Morgan, Inc., initiated these actions against the Cities of Alliance, Oshkosh, Kimball, Chappell, Sidney, Gordon, and Chadron and the Villages of Hemingford *321 and Gurley (collectively the municipalities). The municipalities initiated a review of a "P-0802 surcharge" under Neb.Rev.Stat. § 19-4618(1) (Reissue 1997) and passed ordinances prohibiting KNE from collecting the P-0802 surcharge from ratepayers within the municipalities. KNE initiated these collateral attacks to enjoin the municipalities from enforcing the ordinances. The district court found KNE's actions to be prudent and reasonable and thus enjoined the municipalities from enforcing the ordinances. The municipalities appeal, arguing that the P-0802 surcharge is not a "prudently incurred" expense under Neb.Rev.Stat. § 19-4612(5) (Reissue 1997). We affirm.

BACKGROUND
In 1972, KNE obtained the right to purchase leases for several hundred thousand acres of potential natural gas reserves in Montana, in an area known as the Bowdoin Field. KNE assigned those lease rights to its then wholly owned production affiliate, Midlands Gas Corporation (Midlands). Midlands later purchased the Bowdoin Field leases, and on December 21, 1973, KNE entered into a contract to purchase natural gas from Midlandsthe P-0802 contract. The P-0802 contract required KNE to purchase gas for the life of the Bowdoin Field.
The P-0802 contract was amended in 1975 to add additional acreage, bringing the total to approximately 600,000 acres of gas reserves. The 1975 amendment provided for the pricing of gas under the contract at the maximum lawful price established for the Bowdoin Field, whether that price was higher or lower than the base contract price. The amendment also included a provision under which Midlands, but not KNE, could trigger price redetermination as to any gas sold under the contract that became deregulated. Natural gas first flowed under the P-0802 contract in 1976 and has continued without interruption ever since.
KNE occasionally loaned money to Midlands to fund Midlands' gas exploration and development operations. In 1981, Midlands entered into a production payment financing agreement in which it pledged the revenue from the P-0802 contract to repay a $30 million loan from institutional investors. The proceeds from this loan were used to repay KNE for capital advances made by KNE to assist Midlands in the acquisition and development of leases in the Bowdoin Field. KNE used those funds for corporate purposes, including additional gas purchases.
In 1983, KNE divested Midlands to avoid a hostile takeover. After December of that year, KNE had no corporate relationship with Midlands.
Beginning in 1998, KNE offered a "Choice Gas" program that gave its Nebraska retail customers an annual option to choose their gas supplier. Each of the municipalities has adopted the choice gas program. The municipal ordinances that adopted this program provided that KNE would recover any above-market costs of the P-0802 contract. When the P-0802 contract was below market, retail customers would receive a credit. The mechanism by which above-market costs of the P-0802 contract are recovered has come to be referred to as the "P-0802 Surcharge."
Between February and April 1999, each of the municipalities adopted resolutions to conduct a "targeted prudence and rate-related review" of the P-0802 surcharge. Following hearings in each rate area, each of the municipalities adopted ordinances similarly providing that
the above-market costs associated with the P-0802 Contract currently recovered by KNE through the "P-0802 Surcharge" from all customers on KNE's *322 distribution system in this municipality and throughout the rate areas served by KNE are not prudently incurred costs and therefore such above-market costs are not an authorized expense recoverable through a "rate" under the [Municipal Natural Gas Regulation Act] and consequently KNE should be prohibited from including and seeking to recover such above-market costs, whether as part of the "P-0802 Surcharge," or through any other rate or charge, including without limitation, as part of a purchase gas adjustment schedule ("PGA").
KNE filed these collateral attacks in the district court for Lancaster County, seeking to enjoin the municipalities from enforcing the ordinances. On August 3, 2001, the district court ruled in favor of KNE and enjoined enforcement of the ordinances.

ASSIGNMENTS OF ERROR
The municipalities assign the following errors: (1) the August 3, 2001, order and judgment of the district court finding that (a) the original terms of the P-0802 contract were prudent and reasonable, (b) the terms of the April 1975 amendment to the P-0802 contract were prudent and reasonable, (c) the 1981 production payment financing transaction involving KNE and Midlands was prudent and reasonable, (d) KNE's divestiture of Midlands in 1983 benefited KNE ratepayers and was prudent and reasonable, and (e) KNE's divestiture of Midlands without first amending the P-0802 contract to insert a contract termination or price redetermination clause was prudent and reasonable; (2) the determination of the district court that the ordinances adopted by the municipalities should be enjoined and that each municipality, its officers, elected officials, employees, representatives, and agents are enjoined from enforcing such ordinances; (3) the scope of the district court's order purporting to enjoin the municipalities from ever " `prohibiting KNE from continuing to include in its rate or charges the above-market costs associated with the P-0802 [c]ontract' "; and (4) the failure of the district court to award the municipalities their reasonable attorney fees under § 19-4618(2).
At trial in the district court, the municipalities did not contend that the 1975 amendment to the P-0802 contract was imprudent nor did they contend that the 1981 production payment transaction was imprudent. Thus, their assignments of error (1)(b) and (c) will not be considered by this court.

STANDARD OF REVIEW
In an appeal of an equity action, an appellate court tries factual questions de novo on the record and reaches a conclusion independent of the findings of the trial court, provided, where credible evidence is in conflict on a material issue of fact, an appellate court considers and may give weight to the fact that the trial judge heard and observed the witnesses and accepted one version of the facts rather than another. K N Energy, Inc. v. Cities of Broken Bow et al., 244 Neb. 113, 505 N.W.2d 102 (1993).

ANALYSIS
It is evident from the parties' briefs that the proper burden of proof and scope of review requires some clarification. We have held that a municipal corporation, in fixing rates to be charged by a public utility, acts in a legislative rather than a judicial capacity. K N Energy, Inc. v. City of Scottsbluff, 233 Neb. 644, 447 N.W.2d 227 (1989). Courts will generally presume that legislative or rulemaking bodies, in enacting ordinances or rules, *323 acted within their authority and that the burden rests on those who challenge their validity. Busch v. Omaha Pub. Sch. Dist., 261 Neb. 484, 623 N.W.2d 672 (2001).
The municipalities contend, without citation, that "[i]f any substantial evidence exists supporting the Municipalities' findings reflected in the Ordinances, the Ordinances are valid." Brief for appellants at 13. The municipalities are mistaken in this contention. In K N Energy, Inc. v. City of Scottsbluff, supra, the City of Scottsbluff made a similar and unsuccessful argument.
Elsewhere, the municipalities argue that this court examines the evidence to determine if "any rational basis exists to support the Municipalities' actions." Reply brief for appellants at 13. Again, the municipalities are simply wrong. It is well established that in a collateral attack on a rate or rates set by an ordinance, the burden is on a utility to show that the municipally established rate is unjust, unreasonable, and confiscatory, in violation of the constitutional right to due process. K N Energy, Inc. v. Cities of Broken Bow et al., supra; K N Energy, Inc. v. City of Scottsbluff, supra; Kansas-Nebraska Nat. Gas Co., Inc. v. City of Sidney, 186 Neb. 168, 181 N.W.2d 682 (1970). The review by this court of factual questions is de novo on the record. See K N Energy, Inc. v. Cities of Broken Bow et al., supra.
Prior to the recent enactment of the State Natural Gas Regulation Act, Neb.Rev.Stat. § 66-1801 et seq. (Supp.2003), rates charged by a utility for natural gas service were regulated by municipalities under the Municipal Gas Regulation Act, Neb.Rev.Stat. § 19-4601 et seq. (Reissue 1997). Municipalities were authorized, once in any 36-month period, to "initiate a proceeding for a review and possible adjustment in rates to conform such rates to the standards of section 19-4612 by the introduction of a resolution for such purpose." § 19-4618(1). The ordinances passed by the municipalities in this case make no mention of § 19-4618(1) and instead purport to initiate a review under § 19-4604(1). However, the resolutions call for a "targeted prudence and rate-related review." As we shall see below, the prudence of a rate charged is one of the standards encompassed in § 19-4612. Thus, for purposes of our analysis, we deem the resolutions to have initiated a § 19-4618(1) review.
As stated, the municipalities' proceedings are initiated for the purpose of "a review and possible adjustment in rates to conform such rates to the standards of section 19-4612." § 19-4618(1). Section 19-4612 provides:
(1) The municipality, in the exercise of its power under the Municipal Natural Gas Regulation Act to determine just and reasonable rates for public utilities, shall give due consideration to the public need for adequate, efficient, and reasonable natural gas service and to the need of the utility for revenue sufficient to enable it to meet the cost of furnishing the service, including adequate provisions for depreciation of its utility property used and useful in rendering service to the public, and to earn a fair and reasonable return upon the investment in such property.
(2) Cost of service shall include operating expenses and a fair and reasonable return on rate base, less appropriate credits....
(3) In determining a fair and reasonable return on the rate base of a utility, a rate of return percentage shall be employed that is representative of the utility's weighted average cost of capital including, but not limited to, long-term debt, preferred stock, and common equity capital.

*324 (4) The rate base of the utility shall consist of the utility's property, used and useful in providing utility service, including the applicable investment in utility plant, less accumulated depreciation and amortization, allowance for working capital, such other items as may be reasonably included, and reasonable allocations of common property, less such investment as may be reasonably attributed to other than investor-supplied capital unless such deduction is otherwise prohibited by law.
(5) Operating expenses shall consist of expenses prudently incurred to provide natural gas service including a reasonable allocation of common expenses which shall include allocations authorized by subsection (3) of section 19-4621.
(Emphasis supplied.)
The municipalities contend that the P-0802 surcharge is not a "prudently incurred" expense under § 19-4612(5) and thus is not recoverable by a utility under the Municipal Gas Regulation Act. This case marks the first opportunity for this court to determine if a utility's expenses were "prudently incurred" under § 19-4612(5). KNE urges this court to adopt the test for determining the prudence of a utility's expenses established by the Federal Energy Regulatory Commission (FERC) in New England Power Co., 31 F.E.R.C. & para; 61,047, 1985 WL 191206 (1985), rehearing denied 32 F.E.R.C. & para; 61,112, 1985 WL 67138, affirmed sub nom. Violet v. F.E.R.C., 800 F.2d 280 (1st Cir.1986). In that decision, FERC's analysis of the relevant case law resulted in the following statement:
"[M]anagers of a utility have broad discretion in conducting their business affairs and in incurring costs necessary to provide services to their customers. In performing our duty to determine the prudence of specific costs, the appropriate test to be used is whether they are costs which a reasonable utility management (or that of another jurisdictional entity) would have made, in good faith, under the same circumstances, and at the relevant point in time. We note that while in hindsight it may be clear that a management decision was wrong, our task is to review the prudence of the utility's actions and the costs resulting therefrom based on the particular circumstances existing either at the time the challenged costs were actually incurred, or the time the utility became committed to incur those expenditures."
(Emphasis omitted.) Violet v. F.E.R.C., 800 F.2d at 282-83, quoting New England Power Co., supra.
The disdain for viewing a utility's incurrence of costs in hindsight can be traced further back to a concurring opinion in Southwestern Tel. Co. v. Pub. Serv. Comm., 262 U.S. 276, 289 n. 1, 43 S.Ct. 544, 67 L.Ed. 981 (1923), where Justice Brandeis stated:
The term "prudent investment" is not used in a critical sense. There should not be excluded from the finding of the base, investments which, under ordinary circumstances, would be deemed reasonable. The term is applied for the purpose of excluding what might be found to be dishonest or obviously wasteful or imprudent expenditures. Every investment may be assumed to have been made in the exercise of reasonable judgment, unless the contrary is shown.
We are persuaded by the logic of the test established in New England Power Co., supra, and hold that whether expenses are "prudently incurred" under § 19-4612(5) shall be judged against that test. We now proceed to apply that test to the facts of this case.
*325 At the rate hearings, the municipalities' expert witness, Dr. William G. Foster, challenged three actions of KNE with respect to the P-0802 contract: (1) the 1975 amendment, (2) the 1981 production payment financing, and (3) the 1983 divestiture of Midlands. At trial, Foster testified that he no longer believed the 1975 amendment to the P-0802 contract was imprudent. Furthermore, he did not testify that the production payment transaction was imprudent. He did, however, maintain that KNE acted imprudently in divesting Midlands without adding a market-out clause to the P-0802 contract. A market-out clause allows a buyer to terminate the contract if the seller declines to accept a price lower than the contractually agreed upon price. Our review in this appeal is limited to prudence of the P-0802 surcharge in light of the 1983 divestiture of Midlands.
KNE's distribution system differed from most interstate pipeline companies. It may best be described as a "spider web" extending into Colorado, Wyoming, Nebraska, and Kansas, unlike most other pipeline companies that utilize a single line of pipeline. KNE's system required sufficient natural gas supplies at the south and west end of its system to ensure reliable and adequate service to its customers as required by FERC policy. Notably, KNE's natural gas service to its customers has been continuous since the P-0802 contract was executed.
Dr. Charles J. Cicchetti testified as an expert witness for KNE. He testified that between 1975 and 1981, several events occurred to prompt a "major energy crisis," including the Iranian revolution, the hostage crisis in Tehran, and the Iran-Iraq war. In addition to those events, the emergence of spot prices and a "value gap" between natural gas prices and competing fuels led to the emergence of "corporate raiders." Most experts of the time predicted a significant price increase after deregulation of some types of natural gas. Cicchetti testified that in 1983, it was widely expected that the types of gas constituting the bulk of gas purchased under the P-0802 contract would be regulated indefinitely.
The district court also received evidence regarding the events and circumstances leading up to the 1983 divestiture of Midlands. According to Cicchetti, the passage of the Natural Gas Policy Act of 1978 (NGPA) was a significant event in the regulation of natural gas pipeline companies, and he explained the various pricing rules established by the NGPA for different types of natural gas. The different categories of gas came to be referred to by the relevant section of the NGPA; for example, section 107 gas was an expensive gas source found in deep or tight sand formations. The gas wells under the P-0802 contract were made up of four NGPA categories. The majority of the P-0802 gas were low-priced sections 104 and 108 gas, and these categories were not subject to deregulation under the NGPA. There was no expensive section 107 gas under the P-0802 contract.
As indicated both by Cicchetti's testimony and a 1990 report prepared by Foster for other litigation, forecasts from 1981 predicted that the natural gas prices would increase significantly in the next decade. It was predicted that natural gas prices would rise more rapidly than other fuels because (1) regulation had kept natural gas prices substantially below their market value and replacement cost; (2) higher priced supplemental gas would become a larger part of the supply; (3) natural gas would be priced at the same level as oil; (4) exploration costs would increase; and (5) natural gas supplies were limited. These predictions were based on the fact *326 that most experts, including Cicchetti, thought the surplus of natural gas that existed in 1983 would be short lived. Furthermore, at this time, pipeline reserve-to-production ratios were still below their historic levels. Cicchetti testified that experts widely thought natural gas prices would be tied to oil prices.
Cicchetti testified that in 1983, industry and market conditions made it advantageous for investors to purchase gas supplies rather than drill for them. Those conditions led to the emergence of "corporate raiders" like T. Boone Pickens. In 1983, Pickens and his company, Mesa Petroleum, initiated a hostile takeover to acquire KNE's gas reserves, including those held by Midlands. Hassel Sanders, a former officer of KNE, testified that in order to protect the valuable gas reserves provided under the P-0802 contract, KNE decided to divest its Midlands affiliate to KNE shareholders. The spinoff of Midlands allowed KNE to obtain a reasonable value for Midlands' production assets while protecting KNE ratepayers from a breakup of the corporation by Pickens or other "corporate raiders."
According to Cicchetti's analysis of a report prepared by Foster in 1985, market-out clauses were becoming evident in contracts after 1982, but they were not the norm in older contracts. Consistent with its 1983 gas acquisition guidelines, KNE sought to have market-out clauses included in its new contracts. Also in 1983, KNE had the lowest weighted average cost of gas (WACOG) of any interstate pipeline. At that time, the P-0802 contract average price was lower than alternate fuels.
Cicchetti testified that market-out clauses had less value in 1983 to low-cost pipeline companies such as KNE, which did not have large amounts of expensive Canadian or NGPA section 107 gases. Such clauses mostly were triggered by pipelines with high WACOG's. The district court found that KNE should not have reasonably anticipated exercising a clause for contracts like the P-0802 contract that covered no section 107 gas. In 1983, KNE was exercising contract termination rights for certain contracts, but only for its relatively small amount of high-priced section 107 gas. There was no section 107 gas in the P-0802 contract.
The district court found that KNE did not need to insert new buyer protection or contract termination language in the P-0802 contract. At trial, Foster criticized KNE for not inserting a market-out clause in the P-0802 contract before the Midlands spinoff. However, Cicchetti testified that the P-0802 contract already had buyer protection language. Both the initial P-0802 contract and the 1975 amendment had a provision that would allow the contract price to be adjusted downward if FERC ever disallowed a portion of the price. The contract also had language to address deregulation. This language was utilized later by KNE in 1985 to force a price renegotiation of the contract.
Cicchetti explained that market-out clauses were not that common in 1983. In 1983, KNE did exercise market-out clauses in other contracts to lower gas costs, but only for contracts containing high-priced section 107 gas. KNE needed the P-0802 contract to maintain its balanced gas portfolio. Cicchetti testified that KNE could keep its overall WACOG low, even if certain gas categories in the contract exceeded market prices, by exercising market-out clauses in other higher-priced contracts.
Moreover, Cicchetti testified that KNE had a strong regulatory reason not to include a market-out clause in the P-0802 contract. FERC required that all similar contracts be treated in the same manner. Therefore, if KNE decided to exercise market-out clauses in other contracts, it *327 then would have had to do the same in the P-0802 contract if, in fact, the P-0802 contract contained a market-out clause. This would have jeopardized the valuable reserves KNE had under the contract. As established by Sanders, those reserves at the western end of the KNE system were absolutely essential in order to maintain the pressure and the gas supply necessary for uninterrupted service to KNE customers. Thus, KNE maintained the option to treat the critical P-0802 contract reserves differently and keep that gas flowing, while terminating, if necessary, more recent vintage contracts to keep its overall gas costs low.
With regard to KNE's rate of return, Dr. R. Charles Moyer testified that the appropriate rate of return on equity for KNE was 12.7 percent. KNE also presented evidence of its actual rate of return in each of the three rate areas as 6.10 percent, 6.44 percent, and 0.35 percent. If the P-0802 surcharge were eliminated pursuant to the municipalities' ordinances, those rates of return for each of the three rate areas dropped to -1.29 percent, -0.63 percent, and -7.79 percent.
In our de novo review, we are mindful that the district court credited certain evidence rather than other evidence, and we conclude that the P-0802 surcharge was a prudently incurred expense under § 19-4612(5). The district court did not err in enjoining the municipalities from enforcing the ordinances. While the municipalities take exception to the scope of the district court's order, we do not read the district court's order as broadly as do the municipalities. The district court enjoined enforcement of the ordinances passed in this case, just as requested by KNE's petition. The judgment of the district court is affirmed. In light of our conclusion, the district court did not err in denying the municipalities attorney fees under § 19-4618(2).
AFFIRMED.
HENDRY, C.J., and CONNOLLY, J., not participating.
