This is an appeal from an eminent domain proceeding initiated by the city of Westwood. M & M Oil Company, Inc., a lessee of the property, appeals from an order disallowing its expenses in the proceeding.
The city of Westwood filed a petition on January 16, 1980, in the District Court of Johnson County, Kansas seeking to exercise the power of eminent domain per K.S.A. 26-201 et seq., over land commonly referred to as 47th and Rainbow Blvd. Defendants named in the petition were Juliette M. Finch, Suzanne Finch a/k/a Suzanne R. Finch, Phillips Petroleum Company, and M & M Oil Company, Inc. A motion to amend the petition was granted on February 4, 1980, and European Motors, Inc., Bob Cole, Pat Griggs, Paul Griggs, and Steve Griggs were added as defendants.
Some of the above-named defendants were fee owners and some were lessees. We do not know who were owners from the record, but we do know the appellant herein, M & M Oil Company, Inc., holds a leasehold interest in the property until December 1, 1983, with an option to purchase. M & M hired a real estate appraiser and attorneys to represent its interests in the proceeding. The merits of the matter were never heard. No court appraisers were appointed. The right of the city of Westwood to condemn the real estate was never determined. By an ex parte order the action was dismissed on oral motion of the city.
*49The city of Westwood entered into an agreement with the owners of the property and purchased the property, subject to defendant’s leasehold interest. This was accomplished at some point in time prior to the dismissal of the action.
M & M Oil Company, Inc. then filed a motion for allowance of reasonable expenses pursuant to K.S.A. 26-507(b). A hearing on said motion was held and the motion was denied by the court. M & M timely filed a notice of appeal.
The statute allowing expenses in eminent domain proceedings is as follows:
“(a) Payment of award; vesting of rights. If the plaintiff desires to continue with the proceeding as to particular tracts it shall, within thirty (30) days from the time the appraisers’ report is filed pay to the clerk of the district court the amount of the appraisers’ award as to those particular tracts and court costs accrued to date, including appraisers’ fees. Such payment shall be without prejudice to plaintiff’s right to appeal from the appraisers’ award. Upon such payment being made the title, easement or interest appropriated in the land condemned shall thereupon immediately vest in the plaintiff, and it shall be entitled to the immediate possession of the land to the extent necessary for the purpose for which taken and consistent with the title, easement or interest condemned. The plaintiff shall be entitled to all the remedies provided by law for the securing of such possession.
“(b) Abandonment. If the plaintiff does not make the payment prescribed in subsection (a) hereof for any of the tracts described in the petition, within thirty (30) days, from the time the appraisers’ report is filed, the condemnation is abandoned as to those tracts, and judgment for costs, including the appraisers’ fees together with judgment in favor of the defendant for his reasonable expenses incurred in defense of the action, shall be entered against the plaintiff. After such payment is made by the plaintiff to the clerk of the court, as provided in subsection (a) hereof, the proceedings as to those tracts for which payment has been made can only be abandoned by the mutual consent of the plaintiff and the parties interested in the award.” K.S.A. 26-507. Emphasis supplied.
The appellant construes the statute liberally and asserts that the statute was enacted to prevent harassment procedures by condemning authorities. In the past, appellant states, certain instrumentalities were guilty of bringing successive actions to condemn parcels of land with no intention of prosecuting to a conclusion, and thereby harassed the property owner into submission and acceptance of whatever terms were offered.
“The first rule of statutory construction is to ascertain, if possible, the intent of the legislature.” Nordstrom v. City of Topeka, 228 Kan. 336, 340, 613 P.2d 1371 (1980).
If the intent of the legislature was to prevent harassment by use of successive actions then the statute only applies to cases where *50the city has abandoned the condemnation and may file successive actions. By providing a judgment against the city for a defendant’s costs, the effect would be to discourage the city from initiating successive court actions. This seems to be a fair reading of the statute because § b is entitled “Abandonment” and the word “abandoned” is used twice within that section.
Appellants assume the city “abandoned” the condemnation within the meaning of the statute. However, in this case the city did not abandon the condemnation project. It purchased the property, and by doing so before the appraisers were appointed, it probably saved money. There seems little reason to saddle the city with lessees’ costs merely because the city settled the controversy giving rise to the condemnation.
The supreme court has dealt with dismissals of leasehold interests in eminent domain proceedings. In State Highway Commission v. Bullard, 208 Kan. 558, 493 P.2d 196 (1972), the issue was whether the owner of a leasehold interest had standing to intervene in a proceeding after such tract had been dismissed from the proceeding. The question was answered in the negative. However, the issue whether the leaseholder could be awarded his costs after dismissal was not raised by the parties or addressed by the court.
The following cases support the “no abandonment” theory.
In Whittier Union High Sch. Dist. v. Beck, 45 Cal. App. 2d 736, 114 P.2d 731 (1941), the court stated that the fact that the school district had procured a dismissal of the condemnation proceeding after it had acquired the property by purchase did not constitute an “abandonment” within the meaning of a statute providing for an award of attorney fees and necessary expenses upon abandonment by plaintiff. The California court said:
“The sole question properly presented by this appeal, therefore, is whether the dismissal of the action by the plaintiff after the purchase of the property constituted an abandonment of the proceedings within the meaning and application of section 1255a. Obviously, there was no such abandonment. The property in question had been acquired by purchase, plaintiff had achieved the purpose of the suit, the matter had been settled out of court and there was no further necessity of a judgment of condemnation. Plaintiff having acquired the property which formed the subject of the proceeding in eminent domain could hardly be said to have abandoned its efforts to acquire the. same. The question is answered by the apparent purpose for which section 1255a was enacted, namely, ‘to meet certain abuses arising out of resort to the action without seriously intending to prosecute it to a conclusion.’ (Pacific Gas etc. Co. v. Chubb, supra, at page 270.) Certainly, *51plaintiff’s good faith in the instant case was shown when the property was actually purchased. There can be no question that in cases other than abandonment, there being no provision therefor found under the title ‘Eminent Domain’ (Title VII) in Part III, Code of Civil Procedure, a proceeding in eminent domain may be dismissed as elsewhere provided by the said code, as under section 581, subdivision 1, in the instant case. People v. Southern Pacific R. R. Co., supra, at pp. 263, 264, provides a complete answer to the question here presented, and distinguishes the Silver Lake Power & Irrigation Co., case, supra. Also see City of Bell v. American States Water Service Co., supra, wherein dismissal of a proceeding in eminent domain under section 583, Code of Civil Procedure, was upheld.
“It follows that under the circumstances the trial court erred in entertaining respondent’s motion for dismissal under section 1255a, Code of Civil Procedure, in entering judgment of dismissal pursuant thereto and in awarding respondent her attorney’s fees.” 45 Cal. App. 2d at 739-40.
In U.S. v. 410.69 Acres of Land, Etc., 608 F.2d 1073 (5th Cir. 1979), the federal court construed a provision of the Uniform Relocation Assistance and Real Property Acquisition Policies Act, 42 U.S.C. § 4654(a). This statute provided that the owner of property be awarded sums for reimbursement of expenses if “the proceeding is abandoned by the United States.” 42 U.S.C. § 4654(a)(2). The court stated, reading the act in its entirety:
“[W]e do not think the statute was intended to require reimbursement by the Government of the litigation expenses actually incurred by a landowner in a condemnation proceeding voluntarily dismissed by the Government when the landowner subsequently sells the land to the Government for his asking price, particularly when the landowner asks the district court to order reimbursement after successfully concluding the sale. It is at the very least anomalous that the fees the landowner in this case wishes to charge to the Government because of the dismissal of the condemnation proceedings were calculated as a percentage of the amount received by the landowner when it sold its property to the United States. If, when a motion to recoup litigation expenses is filed in the district court, the Government has not already purchased the land in question from the landowner, we might well reach a different result notwithstanding the Government’s intention to take the property at some future time. Here, however, before it even filed the motion to recoup its litigation expenses, Perdido Key has been paid the price it asked for the land. Under these circumstances we think an award of litigation expenses to the landowner would run contrary to the intent of Congress in enacting § 304(a).” 608 F.2d at 1076.
The same result was reached in Illinois in Dept. of Public Wks. & Bldgs. v. Bartz, 6 Ill. App. 3d 160, 285 N.E.2d 261 (1972). The court said:
“Without an abandonment of the proceedings there can be no allowance of costs, expenses and attorney fees.
“Here there was no abandonment of the enterprise, or of the location and route *52of the improvement, it was in fact constructed and completed. To imply a consent to abandonment of the proceedings on the part of the State would contemplate an abandonment of the improvement planned, or a change of location or route or an abandonment of the design of taking the particular property involved for public use, in short, a good faith, complete surrender of the project as far as the land involved is concerned.
“Any rights which the parties may have in a condemnation suit are governed by the provisions of the Statute.” 6 Ill. App. 3d at 163.
Appellant has cited no cases to the contrary and our research has discovered none.
Appellant wants to be made whole for its expenses incurred by it in defending against the action instituted by the city of West-wood. By assuming there was an abandonment, appellant would have this court construe the statute liberally and award it its costs. Even if this case had gone to trial, appellant would not have been able to put on evidence of the specific value of the leasehold interest. The Supreme Court of Kansas in City of Manhattan v. Kent, 228 Kan. 513, 618 P.2d 1180 (1980), adhered to the undivided fee rule and allowed evidence of the leasehold interest only as a factor in arriving at the market value of the entire tract at the time of taking. 228 Kan. at 518-19. Appellant does not allege there was a taking of his leasehold interest.
The courts have no right to enlarge the scope of a statute nor to amend it by judicial interpretation. Schroder v. Kansas State Highway Commission, 199 Kan. 175, 428 P.2d 814 (1967). This court, faced with the problem of construction of a statute, has as its function to interpret the statute and not to rewrite legislation. Dougan v. McGrew, 187 Kan. 410, 357 P.2d 319 (1960), 86 A.L.R.2d 1174 (1962).
Judgment affirmed.