
381 N.W.2d 275 (1986)
HY-VEE FOOD STORES, INC., Plaintiff and Appellant,
v.
SCRIVNER, INC., Defendant and Appellant, and
Carl E. Flake, Defendant and Appellee.
No. 14826.
Supreme Court of South Dakota.
Argued November 19, 1985.
Decided February 5, 1986.
*277 Craig A. Kennedy, Doyle & Kennedy, Yankton, for plaintiff and appellant.
Frank J. Brady, Brady, Kabeiseman, Reade & Johnson, Yankton, for defendant and appellant.
William J. Klimisch, Goetz, Hirsch & Klimisch, Yankton, for defendant and appellee.
HERTZ, Acting Justice.
This is a civil appeal from a jury verdict returned against Hy-Vee Food Stores, Inc., (Hy-Vee), and Scrivner, Inc., (Scrivner), appellants, for breach of a commercial lease, and which awarded Carl E. Flake (Flake), appellee, $78,051.00 in damages. We affirm.
Hy-Vee is the assignee of the original lessee, Scrivner. Flake is the owner and lessor of the premises.
On June 1, 1983, Flake served a notice to quit pursuant to SDCL 21-16-2 (Forcible entry and detainer) upon tenants Hy-Vee and Scrivner. Hy-Vee refused to vacate the premises. Hy-Vee further responded by bringing an action for declaratory judgment against both Scrivner and Flake. Scrivner answered and counterclaimed. Flake also answered, counterclaimed and cross-claimed against Scrivner for possession of the premises and for damages.
Hy-Vee, joined by Scrivner, moved for a bifurcated trial. This motion was denied. Prior to trial Hy-Vee and Scrivner agreed not to try the claims between themselves, but to reserve those claims for a later determination.
Hy-Vee and Scrivner also moved for summary judgment, which motion was also denied by the trial court.
In the summer of 1975, Flake acquired certain real property and began construction of a commercial building on the outskirts of the city of Yankton, South Dakota. Flake entered into an agreement with Scrivner to lease the building to Scrivner. The building was constructed according to plans and specifications by Scrivner. It was designed for use as a retail store. Scrivner, in fact, originally operated the building as a "Gibsons" discount retail store. The lease was for a primary term of 20 years with two 5 year options for renewal on the same terms as the original lease. The rent was set at $47,255.00 per year, and would not change at any time during the term of the lease or its renewal options. Certain provisions of the lease are pertinent to our discussion here and will be referred to in more detail under issues presented.
The Gibsons operation started just prior to the Christmas season in 1975 and continued until about Memorial Day, 1979. At this time Scrivner terminated the Gibsons store and opened a grocery outlet store known as Buy-For-Less. Flake was personally present at this time and was aware of the change since he was familiar with Scrivner's operation of a Buy-For-Less store in his hometown of Dodge City, Kansas. Flake did not visit the Yankton building site from Memorial Day, 1979, to Memorial Day, 1983. His absence was attributed to an illness both of himself and his son, which commenced in the late summer of 1979.
After the Gibsons operation was terminated, Scrivner performed certain exterior and interior changes in order to make it suitable for the Buy-For-Less grocery store. The extent of these changes will be further detailed hereafter.
Flake returned to Yankton on Memorial Day weekend of 1983. At this time he inspected the building and grounds, and thereafter, served a notice to quit on both Hy-Vee and Scrivner. It was at this point Hy-Vee and Scrivner commenced their declaratory judgment action to determine the *278 validity of their tenancy under the lease. Hy-Vee and Scrivner admitted the changes that were made to the building. The testimony at trial centered basically on (1) were the changes "structural alterations" or "additions", and (2) was maintenance adequate.
The various issues raised by this appeal will be treated separately and under appropriate headings.

I

WHETHER THE TRIAL COURT ERRED IN FAILING TO GRANT SUMMARY JUDGMENT AS A MATTER OF LAW IN A DECLARATORY JUDGMENT ACTION WHEN THE LANGUAGE IN THE LEASE WAS UNAMBIGUOUS, AND THERE WAS NO QUESTION OF FACT BEFORE THE COURT?
Hy-Vee and Scrivner moved for summary judgment based on the provisions of Section # 6 of the lease. It is necessary to set out this provision in full in order to fairly resolve the issue addressed:
6. Lessor's Financing: Lessor reserves the right to subject and subordinate this lease at all times to the lien of any first mortgage or first deed of trust placed upon Lessor's interest in the said premises, and upon the land or premises of which the leased premises form a part, and Lessee shall execute and deliver, upon the demand of Lessor, its successors and assigns, such further instrument subordinating this lease to the lien of any such mortgage or deed of trust provided such mortgage or deed of trust shall recognize the validity and continuance of this lease in the event of foreclosure, or by conveyance in lieu of foreclosure, so long as Lessee shall not be in default under the terms of this lease.
If the leased premises or any part thereof, or premises of which the leased premises are a part, are at any time subject to a first mortgage or a first deed of trust, and this lease or the rentals are assigned to such mortgagee, trustee or beneficiary, and the Lessee is given written notice thereof, including the post office address of such assignee, then to afford such assignee an opportunity to make performance for, and on behalf of, the Lessor, Lessee shall be given written notice in the manner set forth herein to such assignee simultaneously with the giving of any written notice to Lessor required herein to be given by Lessee to Lessor.
Notwithstanding anything to the contrary set forth in this lease neither Lessor nor Lessee shall terminate this lease nor shall Lessee abate payment of monthly rental for default or breach of the lease during its primary term, as set forth in the first sentence of paragraph 2 hereof, and while there is either (1) a first mortgage lien on the leased premises, or (2) the former mortgagee of such first mortgage, its successors or assigns, and acquired title to the leased premises by foreclosure of such first mortgage, or by deed in lieu of foreclosure, the parties hereto reserving all other rights at law and equity.
The Lessee hereby convenants and agrees that, prior to or upon the opening of the Lessee's premises for business and the commencement of the term of the lease, and upon Lessor's furnishing appropriate names and addresses to Lessee, it will deliver a letter to the Lessor or the holder of a first mortgage or first deed of trust covering the lease premises, or the premises of which the lease premises are a part, or to any person or corporation which has entered into a commitment with the Lessor for the financing of said leased premises, setting forth the date upon which the term of this lease has commenced or shall commence, and the date upon which the obligation of Lessee to pay rent under this lease commenced, or shall commence, and further setting forth that to the best of its knowledge, there is no prepaid rent or offset to rent, and Lessor has completed the construction of the improvements required to be constructed by Lessor pursuant to this lease, or specifying the respects, *279 if any, in which the Lessor has failed to complete such construction, or setting forth any prepaid rent or offset to rent.
In the event Lessor shall, within 60 days of the date of the lease herein, be unable to secure financing for construction satisfactory to Lessor, then in that event, this lease shall be null and void and of no further effect.
A copy of a first mortgage on the leased premises, dated July 8, 1975, was submitted with the motion for summary judgment. It is also noted that the rental payments were assigned by Flake to Yankton Savings & Loan Association on September 9, 1975. J.V. Smith, President of Scrivner, also on this date consented to this rental assignment and agreed to pay the rent directly to the assignee, Yankton Savings & Loan Association. It is to be specifically noted here that there is nothing in the rent assignment to indicate Scrivner subordinated his rights in the lease to the mortgage held by Yankton Savings & Loan Association.
Hy-Vee and Scrivner claim that a subordination of their lease interest was effectuated under the terms of Section # 6, thereby preventing Flake from terminating the lease until after the primary term (20 years) of the lease had run its course. Hy-Vee and Scrivner urge that the language, "Notwithstanding anything to the contrary set forth in this lease neither Lessor nor Lessee shall terminate this lease... while there is ... a first mortgage lien on the leased premises," is conclusive on this point.
A fair reading of Section # 6 in its entirety reveals that Hy-Vee and Scrivner misread the specific requirements that must be met before subordination of the lease interest actually is triggered.
The first paragraph of Section # 6 does provide for the subordination of the lease interest, but it is not self-executing as appellants would claim. There are at least two conditions which must be fulfilled before subordination is actuated. The first is that once the mortgage is executed, as it was in this case, the "Lessee shall execute and deliver, upon demand of Lessor, its successors and assigns, such further instrument subordinating this lease to the lien of any such mortgage...." The record before us is devoid of any such demand ever having been made by the Lessor, nor of any written instrument whereby Lessee subordinated their rights under their lease. Hy-Vee and Scrivner argue that the assignment of rents from Flake to Yankton Savings & Loan Association constitutes such a written instrument. However, this is clearly not the case, since the rental assignment consented to by Hy-Vee and Scrivner is simply just that and nothing more. It required Lessee to pay the rent to Yankton Savings & Loan Association instead of to Flake. There is no reference anywhere in the assignment which could be construed as a subordination agreement between Lessees and the mortgagee. The second condition remaining unfulfilled is the requirement that "provided such mortgage ... shall recognize the validity and continuance of this lease in the event of foreclosure, or by conveyance in lieu of foreclosure, so long as Lessee shall not be in default under the terms of the lease." A detailed examination of the mortgage instrument discloses a complete absence of any reference therein that could meet this requirement.

II

WHETHER THE TRIAL COURT ERRED IN SUBMITTING THE QUESTION OF TERMINATION OF A LEASE, A QUESTION OF LAW, TO THE JURY?
Hy-Vee and Scrivner here argue that the trial court should have ruled upon the question of breach and termination of the lease as a matter of law, before any question of damages were submitted to the jury. They rely on Orr v. Kneip, 287 N.W.2d 480 (S.D.1979), wherein we held that questions of whether a subdistrict's appointment of its Board of Directors has a "rational basis" and was "reasonably precise," were *280 questions of law which the trial court should have decided, rather than issues of fact for jury determination. We there reiterated the well-established rule that questions of law are solely within the province of the court.
We further said in Orr v. Kneip, supra, that declaratory judgments are neutral in that they may involve either equitable claims or legal claims or both. It is up to the trial court to examine the pleadings as a whole and the relief requested to determine the character of the claim. Aside from the issue of lease termination, which by itself constitutes an equitable issue, Hy-Vee claimed a breach of warranty on the part of Scrivner, requesting a judgment in money in like amount from Scrivner in the event Flake was successful against Hy-Vee on its counterclaim. In its third cause of action Hy-Vee sought judgment against Scrivner for representations, covenants and warranties made by Scrivner to Hy-Vee in the sum of at least $1,000,000.00 plus punitive damages in the same sum. In its fourth cause of action, Hy-Vee prayed for judgment against Flake for deceit and asked for damages against Flake in the sum of $1,000,000.00 actual damages and $1,000,000.00 punitive damages. By way of counterclaim, Flake sought relief under SDCL 21-16, the Forcible Entry and Detainer statute. Flake claimed Hy-Vee and Scrivner breached the lease agreement by improper maintenance of the premises and for "structural alterations" contrary to the express terms of the lease. Flake requested immediate possession of the premises because of these claimed violations of the lease agreement. In a second cause of action, embodied within his counterclaim, Flake requested money damages to repair the premises and to restore it to its condition prior to the alterations by Hy-Vee and Scrivner. Flake demanded a jury trial.
It is clear from these various pleadings that there were many questions of fact to be resolved by a jury. There were the various damage claims by the parties, as well as whether or not the necessary maintenance was performed according to the terms of the lease. Further, there was the broad issue of "structural alterations" which Flake claimed were made by Lessees without his permission and in express violation of the lease agreement. A review of the trial record reveals that there was extensive and detailed testimony presented on the "structural alteration" issue and this was the central issue in dispute.
SDCL 15-6-57 provides:
"The procedure for obtaining a declaratory judgment pursuant to Chapter 21-24, shall be in accordance with this chapter, and the right to trial by jury may be demanded under the circumstances and in the manner provided in Sections 15-6-38 and 15-6-39 ..."
SDCL 21-24-9 (Declaratory Judgment Act) provides for the determination of fact issues in the same manner as issues of fact are tried in civil actions. Further, Forcible Entry and Detainer actions under SDCL 21-16 authorize a jury trial on the issue of possession.
In Heiser v. Rodway, 247 N.W.2d 65 (S.D.1976), we held that inquiry may be made into equitable considerations in an unlawful detainer action, as long as those considerations are relevant to the right of possession. It is manifest that the issue of lease termination is a relevant part of any proceeding instituted to determine the right of possession. Because of the many law claims made by the pleadings of the parties, and of the numerous questions of fact involved therein, we conclude the trial court did not err in having the entire case submitted to the jury. The jury was properly instructed as to the law and it was for the jury to make the ultimate fact determination. The various causes of action were founded on contract and the equity issue was incidental to these law claims.

III

WHETHER THE EVIDENCE SUPPORTS A FINDING THAT STRUCTURAL ALTERATIONS OR ADDITIONS WERE MADE UNDER THE TERMS OF THE LEASE?
*281 This claim by appellants is not supported by the record. Without permission of Flake, Hy-Vee and Scrivner tore out lighting fixtures; tore out 8 sets of doors; tore out windows; added a vestibule on the east side of the building; cut 40" square holes in two 25 foot wide concrete supporting panels which are used for a portion of the outside walls, and which support the roof, causing cracks in the panels; installed additional air handling units on the roof of the building, overloading the roof; installed air compressors for which the building was not designed, causing the walls to crack; ran pipelines through the floors; installed warehouse type shelving replacing grocery shelves, thereby overloading the floor, causing it to sag and resulting in holes in the tile; large meat racks hanging from roof supports (this was subsequently corrected by Lessees); new offices and other rooms were torn out and not replaced; the building was changed to accommodate the use of a large fork lift type vehicle which was used to move canned goods throughout the store (causing floors to sag). The building was changed from a Gibson type retail store operation to a high volume warehouse operation. Lessees claim they spent some $600,000.00 in all in effecting these changes.
Flake claims these were "structural" changes which were made contrary to the express provisions of the lease agreements, the pertinent part of which states:
"... No structural alterations or additions shall at anytime be made by Lessee without Lessor's prior written consent, except that Lessee or sub-lessee of Lessee may at their own expense make non-structural or other changes as may modernize or standardize the retail store and parking area without the consent of Lessor."
There was considerable testimony by "experts" on either side of this issue. Without unnecessarily encumbering the record, we conclude that there was sufficient evidence from which a jury could reasonably find that the admitted changes were indeed "structural alterations" as contemplated under the lease agreement. The trial court, additionally, instructed the jury as to the legal definition of the term "structural alterations," and no exceptions were taken by appellants, which then made it the law of the case.
The trial jury's disposition of this issue obviously rested upon its assessment of the testimony presented by the "battle of the experts." As such the jury heard the testimony and considered the evidence. Whether or not Hy-Vee and Scrivner's changes to the building amounted to "structural alterations" was clearly a question of fact for the jury. It is the function of the jury to determine the credibility of the witnesses. State v. Fox, 313 N.W.2d 38, 39 (S.D.1981).
There was ample evidence in the record from which the jury could find a breach of the lease agreement as it pertains to "structural alterations." We, accordingly, find no error here.

IV

WHETHER THE TRIAL COURT ERRED IN ALLOWING FLAKE TO GIVE HIS INTERPRETATION OF THE CONTRACT PROVISION REGARDING STRUCTURAL CHANGE?
It is clear from a reading of the transcripts that Flake's counsel persisted in his attempts to get parol evidence in front of the jury. The trial court stated on numerous occasions that he perceived no ambiguity in the lease and consistently sustained objections in this regard. However, the trial court did allow Flake to testify as to what his interpretation of "structural alterations" was. To that end the following exchange is relevant:

By Flake's counsel: Jim, we've been talking about a certain paragraph in the lease you referred to about structural changes. What's your interpretation of that paragraph?

Answer by Flake: That once the building is completed, that there will not be any structural changes without my permission, *282 but they can decorate the store and do that type of thing for their business.
This interpretation by Flake is consistent with that part of the lease agreement relative to "structural alterations." As such, it did not vary the terms of the written agreement. In any event, if there was any error in allowing this testimony, the jury was fully instructed as to the legal definition of "structural alterations" and "additions" and the jury is presumed to follow the law of the case as contained in the instructions.

V

WHETHER THE TRIAL COURT ERRED IN ALLOWING EXPERT TESTIMONY FOR WHICH THERE WAS AN INADEQUATE FOUNDATION?
Appellants urge that the court erred by permitting Flake and Daniel D. Smith to give their opinion as to "structural alterations." We find no merit in this claim.
Flake was the owner of the property. He was also a general contractor. He had a degree in Business Administration and had taken pre-engineering courses, including graphics, welding and physics. Since 1963 he had built some 100 Gibsons buildings of which 30 to 35 were similar to the present one. Daniel D. Smith had a two year degree in Architectural Drafting, and had an Associate Science Degree. In 1980 he graduated from Kansas State University with a five year degree in Bachelors of Architectural. He teaches two courses of architecture at the University. He worked for Flake as an architectural draftsman and manager. He had extensive experience in building construction. We find the foundation was sufficient for their opinions and that their testimony goes to weight rather than to admissibility.

VI

WHETHER THE TRIAL COURT ERRED IN REFUSING TO RECEIVE PLAINTIFF'S EXHIBITS # 8, # 9 and # 10?
These exhibits detailed the cost of moving from the building should a termination of the lease be found by the jury. Appellants also claim error by the trial court in refusing to allow testimony concerning loss of revenue during the moving period. These claims are directed from Hy-Vee against Scrivner, and the claims between these two parties were severed from the trial at their specific request. Such testimony and exhibits were therefore irrelevant to Flake's Forcible Entry and Detainer action and his counterclaim for damages resulting from structural changes.

VII

WHETHER THERE WAS SUFFICIENT EVIDENCE TO SUPPORT AN AWARD OF DAMAGES?
The jury was instructed upon the measure of damages as follows:
If you decide for defendant Flake on the question of breach of lease you must then fix the amount of money which will reasonably and fairly compensate him for any of the following elements of detriment or damage proved by the evidence to have resulted from the acts of Scrivner, Inc., and/or Hy-Vee Food Stores, Inc., whether such detriment could have been anticipated or not, namely:
1. The lesser of either of the following amounts:
a) The cost of reasonable repairs necessary to the premises that were proximately caused by either Hy-Vee Food Stores, Inc., or Scrivner, Inc., and were not part of ordinary wear and damage by elements during the time of the occupation of the premises;
b) The difference between the reasonable fair value of the premises immediately before the acts constituting the breach of lease and proximately causing the damage and immediately after its injury.
Whether any of these elements of damage have been proved by the evidence is for you to determine. Your verdict must be based on evidence and not upon speculation, guesswork or conjecture.
*283 In Ward v. LaCreek Electric Association, Inc., 83 S.D. 584, 163 N.W.2d 344 (1968), a homeowner's house was damaged by water as a result of the installation of faulty automatic circuit breakers which activated a water pump in the house. There we held that the proper measure of damages to be applied to the house was the lesser of the following: (1) The difference between the reasonable value of the house immediately before and immediately after its injury; or (2) the reasonable expense of repair if the house can thereby be substantially restored to its former position.
The jury returned a verdict of $78,051.00 against both Hy-Vee and Scrivner. Glen Mannes (architect witness for Hy-Vee) testified it would cost $73,940.00 to restore the building. Flake testified it would take $414,177.00. Flake also testified the building was worth $1,200,000.00 before the changes and $800,000.00 after the changes. The County Assessor testified for appellants that at the time of trial the fair market value of the building was $322,230.00. He further testified that that was also the value of the building after the changes were made.
Here the jury chose, as it was their right, to disregard Flake's testimony and the testimony of the County Assessor as to before and after values. We find that the verdict returned by the jury is supported with ample evidence and is in accord with the unobjected to instructions of the trial court.
We, accordingly, affirm the judgment of the trial court.
MORGAN, HENDERSON, and WUEST, JJ., concur.
FOSHEIM, C.J., concurs in result.
FOSHEIM, Chief Justice (concurring in result).
A bifurcated trial separating the equitable claim (interpretation of section six of the lease) would have been more judicious since the equitable claim was more than incidental. It should have taken precedence over others for determination by the trial court. See Skoglund v. Staab, 312 N.W.2d 29, 31 (S.D.1981); Orr v. Kneip, 287 N.W.2d 480, 485 (S.D.1979).
It is difficult to find where the equitable issue was adequately addressed. Hy-Vee's and Scrivner's requests for a declaratory judgment or a bifurcated trial were effectively ignored. Their motions for summary judgment were denied. The order provides no basis for that decision, even though an apparent procedural defect existed. I, therefore, cannot conclude the issue was determined on its merits. It was not tried to a jury by consent of the parties. SDCL 15-6-39(a). An advisory verdict, with findings of fact and conclusions of law by the trial court, was not given. SDCL 15-6-39(c). Ultimately, however, Hy-Vee's Amended Complaint against Flake was dismissed in the final judgment.
Accordingly, while summary judgment for Hy-Vee and Scrivner was properly denied, as the majority concludes, the path taken by the trial court is wanting.
