
550 N.W.2d 39 (1996)
250 Neb. 560
Richard E. STEPHENS, Appellee,
v.
RADIUM PETROLEUM COMPANY, INC., and Industrial Service Corporation, Appellants.
No. S-94-784.
Supreme Court of Nebraska.
July 12, 1996.
*41 Gordon R. Hauptman and Terry M. Anderson, of Hauptman, O'Brien, Wolf & Lathrop, P.C., Omaha, for appellants.
Dennis E. Martin and Karen M. Verdirame, of Martin & Martin, P.C., Omaha, for appellee.
WHITE, C.J., and CAPORALE, FAHRNBRUCH, LANPHIER, WRIGHT, CONNOLLY, and GERRARD, JJ.
FAHRNBRUCH, Justice.
Richard E. Stephens filed suit for wages and benefits from his former employer, Radium Petroleum Company, Inc. (Radium), which company Stephens claims terminated his employment in violation of the terms of an employment and noncompetition agreement executed by the two parties.
A jury trial was held in the district court for Douglas County. The jury returned a $20,018.75 verdict in favor of Stephens.
We affirm the judgment of the trial court.

ASSIGNMENTS OF ERROR
Restated and summarized, Radium claims that the trial court erred in (1) refusing to allow Radium to amend its answer on the first morning of the trial; (2) refusing Radium's proposed jury instructions; (3) providing the jury a supplemental instruction stating that, as a matter of law, the employment contract extended to any position held by Stephens with Radium during the term of the contract; (4) finding, as a matter of law, that the employment contract between Stephens and Radium was unambiguous; and (5) finding, as a matter of law, that the employment contract between Stephens and Radium was valid, binding, and neither modified nor rescinded.

STANDARD OF REVIEW
The decision whether to allow or deny an amendment to any pleading lies within the discretion of the court to which application is made. Cimino v. FirsTier Bank, 247 Neb. 797, 530 N.W.2d 606 (1995).
Generally, jury instructions are subject to the harmless error rule, and an erroneous jury instruction requires reversal only if the error adversely affects the substantial rights of the complaining party. Bunnell v. Burlington Northern RR. Co., 247 Neb. 743, 530 N.W.2d 230 (1995).
The construction of a contract is a matter of law, in connection with which an appellate court has an obligation to reach an independent conclusion irrespective of the determinations made by the court below. C.S.B. Co. v. Isham, 249 Neb. 66, 541 N.W.2d 392 (1996).

FACTS
On August 6, 1992, Stephens filed this lawsuit against Radium, alleging that he was an employee of Radium pursuant to an employment agreement executed by the two parties on December 13, 1986. Stephens alleged that Radium terminated his employment without cause on May 6, 1992, in violation of the employment agreement's requirement that Radium provide Stephens written notice of its intention to terminate 90 days prior to the expiration of the employment agreement. Stephens sought wages and benefits from May 7, 1992, through and including December 12, 1992.
The employment and noncompetition agreement between Stephens and Radium provided in paragraph 1:
The Company hereby agrees to employ Employee for a five (5) year period from the date of the execution of this Agreement, during which time Employee agrees to perform such services as the Company from time to time shall direct, and to devote his full time and effort to the business interests of the Company. Employee's position at the Company shall be that of manager of the Omaha facilities. The duties of the Employee, as manager, shall include, but are not limited to, the overall supervision of the following:
(1) The activities of each Employee of the Company; and
(2) The assignment of routes to the Company drivers; and
(3) Customer relations; and
*42 (4) The purchase and sale of waste oil....
The Company agrees that if the Employee shall perform the services requested by the Company, it shall not terminate the employment of said Employee during the term of this Agreement without just cause. Said Employment Agreement shall automatically renew for one (1) year periods, unless either party hereto shall deliver to the other party ninety (90) days written notice of the intention to terminate the employment relationship prior to the expiration of this Agreement.

(Emphasis supplied.)
In its answer, Radium admitted that Stephens was a former employee under the terms of the employment agreement referred to in Stephens' petition. Radium further answered that it delivered to Stephens on February 5, 1992, a 90-day written notice of Stephens' termination pursuant to paragraph 1 of the parties' employment and noncompetition agreement.
The record reflects that in December 1991, Stephens approached one of his superiors at Radium and said he did not want to be facilities manager any longer because the job was becoming difficult and that he would rather drive a truck. Stephens recommended that his son, who worked for Radium as plant manager, succeed him as facilities manager.
After meeting with Stephens' supervisors in early January 1991, Stephens and his son were directed by their supervisors to exchange job positions. Stephens' son became facilities manager, and Stephens became plant manager.
On February 5, 1992, Radium informed Stephens that he was receiving a 90-day written notice of termination pursuant to their employment agreement and that the effective termination date was May 6, 1992. The notice stated that Stephens was placed on leave of absence immediately.
On the first day of trial, Radium moved to amend its answer to allege as affirmative defenses (1) that the employment agreement had been modified, (2) that the employment agreement had been canceled, and (3) that there was an accord and satisfaction of the terms and conditions of the employment agreement. The trial court overruled the motion to amend the answer. The trial court found that the matter had been certified for trial for some time, that the issues had been joined, and that the addition of new affirmative defenses would open up new terrain in the litigation.
Following the close of all the evidence, the trial court refused Radium's proposed jury instruction which would have instructed the jury to find whether Radium had met its burden of proof to establish that the employment agreement had been canceled by mutual consent. The trial court also refused Radium's proposed jury instruction which would have instructed the jury to find whether Radium had established that the terms of the employment agreement had been orally modified.
During its deliberations, the jury asked the trial court if "it matter[s] that ... Stephens was terminated under the plantman position yet the contract was written and signed for `facility manager'? ..." In a supplemental instruction, the court stated, "[Y]ou are hereby instructed as a matter of law that the contract extends to any position held by Mr. Stephens with Radium Petroleum Company during the term of the contract." The supplemental instruction also referred the jury to instruction No. 9, which instructed the jury that "the contract between the plaintiff and defendant, is a valid and binding contract."
The jury returned a $20,018.75 verdict in favor of Stephens. By special verdict, the jury found that Radium failed to notify Stephens 90 days prior to the expiration of the employment agreement of its intention to terminate him.

ANALYSIS
Initially, we note that Radium does not challenge the findings of the jury.
Radium claims that the trial court abused its discretion when it denied Radium's motion to amend its answer on the morning of the trial. Neb. Rev. Stat. § 25-852 (Reissue 1995) provides:

*43 The [trial] court may, either before or after judgment, in furtherance of justice, and on such terms as may be proper, permit a party upon motion to amend any pleading, process, or proceeding ... by inserting other allegations material to the case, or, when the amendment does not change substantially the claim or defense, by conforming the pleading or proceeding to the facts proved.
In the case at bar, Radium sought to amend its answer on the day of trial. The proposed amended answer would have substantially changed the nature of Radium's defense and unfairly prejudiced Stephens' ability to present his case. A pleading should not be amended to conform to the proof where the proposed amendment substantially changes the nature of the claim or defense. Malerbi v. Central Reserve Life, 225 Neb. 543, 407 N.W.2d 157 (1987). Prejudicial error results when a pleading is allowed to be amended where the amendment changes the issues and affects the quantum of proof as to any material fact. McCook Nat. Bank v. Myers, 243 Neb. 853, 503 N.W.2d 200 (1993). The trial court did not abuse its discretion when it overruled Radium's motion to amend its answer. Radium's first assignment of error is without merit.
Radium further claims that the trial court erred in refusing Radium's proposed jury instructions. The proposed jury instructions regarding cancellation and oral modification of the contract were relevant only to Radium's amended answer, which the court properly refused, and not to the pleadings on which the case was tried. A litigant is entitled to have the jury instructed only upon those theories of the case which are presented by the pleadings and which are supported by competent evidence. Burns v. Metz, 245 Neb. 428, 513 N.W.2d 505 (1994). The trial court did not err in refusing Radium's proposed jury instructions because they were not based upon the theories of the case presented by the pleadings.
Finally, Radium claims that the trial court erred in instructing the jury, in a supplemental instruction, that the employment agreement extended to any position held by Stephens during the term of the employment agreement with Radium. Radium also contends that the trial court erred in finding, as a matter of law, that the contract was unambiguous and binding. Whether a document is ambiguous is a question of law initially determined by a trial court. Knox v. Cook, 233 Neb. 387, 446 N.W.2d 1 (1989). The proper construction of a written contract and an examination of a contract for ambiguity are questions of law. Professional Serv. Indus. v. J.P. Construction, 241 Neb. 862, 491 N.W.2d 351 (1992).
Both parties in their pleadings agree that the employment agreement continued in effect after Stephens was moved from facilities manager to plant manager. The record reflects that in its notice terminating Stephens as plant manager, Radium relied upon language in paragraph 1 of the employment agreement. It appears from the record that the intent of the parties was not that Stephens was hired under the employment agreement only as a facilities manager, but that he was hired under the terms of the agreement to "perform the services requested by the Company." (Emphasis supplied.) It further appears from the record that both parties acted under the employment and noncompetition agreement at all times during and after Stephens' receipt of notice of his termination of employment with Radium. The interpretation given to a contract by the parties themselves while engaged in the performance of it is one of the best indications of true intent and should be given great, if not controlling, influence. Solar Motors v. First Nat. Bank of Chadron, 249 Neb. 758, 545 N.W.2d 714 (1996). As a result, the employment agreement was unambiguous, was a valid and binding agreement, and was applicable to Stephens' employment as facilities manager and as plant manager. The trial court did not err in its supplemental jury instruction or in its findings that, as a matter of law, the contract was unambiguous and valid.

CONCLUSION
Radium wrongfully terminated the employment and noncompetitive agreement executed by Stephens and Radium. A jury found *44 that Radium violated that agreement by not providing Stephens timely notification of his termination. We affirm the judgment of the trial court.
AFFIRMED.
