
686 P.2d 79 (1984)
107 Idaho 134
The HARTWELL CORPORATION, an Idaho corporation, Plaintiff-Appellant,
v.
Edgar F. SMITH, Defendant-Respondent.
No. 14082.
Court of Appeals of Idaho.
June 19, 1984.
*81 Eugene Bush, of Sharp, Anderson, Bush & Nelson, Idaho Falls, for plaintiff-appellant.
Jordan P. Smith, Salmon, for defendant-respondent.
SWANSTROM, Judge.
The Hartwell Corporation sued Edgar Smith, a former employee, to recover on a promissory note. Smith counterclaimed for the reasonable value of his services to the Corporation. At trial, when the evidence was in, the district court ruled Smith had failed to prove the defenses he had pled to the note. Therefore, the court directed the jury to find for the Corporation on its complaint. The jury was further instructed to determine the amount to which the Corporation was entitled under the note and whether Smith should prevail on his counterclaim. The jury awarded the Corporation $5,950, which award is not challenged on appeal, and found in favor of Smith on his counterclaim in the amount of $5,950. The Corporation moved for a judgment n.o.v. The motion was denied and the Corporation appealed.
The Corporation raises five issues on appeal. First, were its motions to dismiss Smith's counterclaim and for judgment n.o.v., on the grounds that his counterclaim was barred by the statute of limitations, properly denied? Second, was its motion for a directed verdict, on the grounds that the evidence was insufficient to entitle Smith to a recovery or an offset, properly denied? Third, did the district court err in permitting the jury to consider Smith's counterclaim when there was no competent evidence from which the jury could determine the amount of any claimed offset? Fourth, was there sufficient evidence to justify instructing the jury on the theory of "unjust enrichment" in regard to Smith's counterclaim? Fifth, did the verdict form which was submitted to the jury improperly suggest that if Smith was entitled to an *82 offset such offset was necessarily equal to the amount found due the plaintiff? We reverse and remand for a new trial on the counterclaim.
The Corporation is engaged in the sale of insurance policies. In July 1972, it hired Smith "in a sales and a management capacity." The Corporation admits that Smith's primary duty was to be in sales. The initial employment agreement between the parties was in writing and provided for a salary of $700 per month. It further stated:
[T]he parties hereto will review this agreement during the month of October, 1972, for the purpose of determining and settling upon a compensation of Employee which will provide for a guaranteed monthly wage predicated on a certain minimum production with a commission payable on production in excess of such minimum. Any agreement reached as to such a compensation plan will be incorporated into this agreement by an addendum hereto.
Smith testified that the parties were unable to reach a new agreement concerning his compensation. However, in October he commenced drawing $750 per month as an advance on commissions earned with the understanding that if at the end of three years the advances exceeded his earnings he would owe the Corporation the difference. Ralph Hartwell, the Corporation president, testified "there was some straight salary in this agreement and commissions that he [Smith] actually earned and were paid the corporation." The jury implicitly found that the parties failed to reach an agreement. The evidence supports such a finding.
Smith claims that after he went on the "draw" system he was inadequately compensated. He testified that ninety percent of the work he did for the Corporation was office management. Smith could not earn commissions for this type of work because it did not involve writing new policies. He therefore fell further into debt to the Corporation each month because he was unable to earn enough commissions to offset the monthly advances.
In July 1973, Smith decided to leave the Corporation and open his own insurance business. Hartwell informed Smith that he owed the Corporation several thousand dollars, the alleged difference between the advances and his earnings. Smith disputed the amount. The Corporation threatened to sue unless Smith signed a promissory note for $4,000, payable in five years. Smith testified that he could ill afford a lawsuit at that time and he therefore signed the note.
After the note reached maturity and Smith made no efforts to pay it off, the Corporation filed this suit in October 1978. Smith's answer to the complaint alleged fraud, inducement, unconscionability and failure of consideration in the execution of the note. He also counterclaimed under the theory of quantum meruit for the reasonable value of his services during the term of his employment.
At the conclusion of the jury trial, the Corporation moved for a directed verdict. The motion was granted as to Smith's defenses to the execution of the note, but denied as to his counterclaim. The district court then proposed to give the following instruction, number twelve, to the jury:
If you find that the parties did not reach an agreement as to the employment contract between the defendant and plaintiff, the law, under certain circumstances, will impose upon parties who have dealt with each other certain obligations as though they were bound by a contract. Thus, if you find from the evidence that in his dealing with the defendant, the plaintiff received a benefit which unjustly enriched the plaintiff and which in fairness and good conscience, should not be retained by plaintiff from the defendant, then you will find the plaintiff is bound, as though by contract, to repay to the defendant the value of the benefit which plaintiff unjustly retained.
The Corporation objected to this instruction on the ground that the evidence was insufficient *83 to support a recovery on the theory of unjust enrichment. The objection was overruled and the jury returned a verdict in favor of Smith on his counterclaim.

I
We will first discuss what we consider to be the threshold issue in this appeal: Did the district court err in denying the Corporation's motion to dismiss Smith's counterclaim and in denying the motion for judgment n.o.v. on the grounds that Smith's counterclaim was barred by the statute of limitations? The defense of the statute of limitations was urged upon the district court throughout the trial and in the motion for judgment n.o.v. Smith, however, contends that the statute of limitations defense was waived because the Corporation failed to plead it with particularity. "In pleading the statute of limitations it is sufficient to state generally that the action is barred, and allege with particularity the Session Law or the section of the Idaho Code upon which the pleader relies." I.R.C.P. 9(h) (emphasis added). The statute of limitations must also be asserted in a responsive pleading if one is required. I.R.C.P. 12(b), (8)(c). In this instance, the defense should have been pled in the reply to the counterclaim.
The Corporation generally referred to the statute of limitations throughout trial. However, it did not cite the particular section of the Idaho Code upon which it relied until its motion for judgment n.o.v. This would normally result in the waiver of the defense of the statute of limitations. See Resource Engineering, Inc. v. Siler, 94 Idaho 935, 500 P.2d 836 (1972). See also C. LEWIS, IDAHO PRE-TRIAL CIVIL PROCEDURE, IV-19, -20 (1982).
Nevertheless, we believe that the statute of limitations issue has been preserved on appeal because it was tried by the consent of the parties. Idaho Rules of Civil Procedure 15(b) provides in part:
When issues not raised by the pleading are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings. Such amendment of the pleadings as may be necessary to cause them to conform to the evidence and to raise these issues may be made upon motion of any party at any time, even after judgment; but failure so to amend does not affect the result of the trial of these issues. [Emphasis added.]
Under the federal rule, which is identical to the Idaho rule, "if evidence relating to an unpleaded affirmative defense is introduced without objection, Rule 15(b) requires the issue to be treated as if it actually had been raised by the pleading." 6 WRIGHT & MILLER, FEDERAL PRACTICE AND PROCEDURE: CIVIL § 1492, at 457 (1971).
In the present case, the Corporation objected early in the trial to evidence relating to Smith's counterclaim: "We believe that the causes of action set forth in the Counter Claim are barred under the applicable statute of limitations... ." Smith replied:
Your Honor, counsel's argument is well taken about the statute of limitations, the dates he set forth are true and I am sure that the statute of limitations is quite true too. Fortunately we are not cast out without any remedy, however. The laws well establish that a Counter Claimant is posed defensively on the same transaction, is not barred by the statute of limitations. The only limitation we have is that we can only offset our claim up to the maximum limits of what they recover.
Thus, not only was the statute of limitations defense tried by consent, it was actually conceded by Smith to be valid. Smith did not challenge the propriety of raising the defense until, in his brief on appeal, he claimed it had been waived. We therefore hold that, because the statute of limitations was tried by consent, it should be deemed to have been raised in the pleadings. See Haskins v. Roseberry, 119 F.2d 803 (9th Cir.1941), cert. denied, 314 U.S. 655, 62 S.Ct. 106, 86 L.Ed. 525 (1941).
Furthermore, there can be no serious dispute about the consequences of our *84 holding. "Idaho has aligned itself with other jurisdictions which consider that a statute of limitations is one of repose, i.e., that the lapse of the statutory period bars the remedy to enforce the debt but does not extinguish the debt." Hirning v. Webb, 91 Idaho 229, 231, 419 P.2d 671, 673 (1966). "[A] counterclaim, arising out of the transaction which is the foundation of plaintiff's claim ... may be pleaded defensively though affirmative relief thereon be barred ... and though it is pleaded affirmatively and affirmative relief is sought." Kelson v. Ahlborn, 87 Idaho 519, 528, 393 P.2d 578, 583 (1964). See also Viehweg v. Thompson, 103 Idaho 265, 647 P.2d 311 (Ct.App. 1982). The transaction in the present case, the employment relationship, formed the basis of both the Corporation's claim and Smith's counterclaim. Therefore, the counterclaim can be used defensively as an offset to the Corporation's claim. In other words, the amount awarded on the note, $5,950, defines the maximum possible award on the counterclaim.

II
The next three issues raised by the Corporation concern the sufficiency of the evidence to support a judgment for Smith on his counterclaim. Issues two and three are also framed in terms of the denial of the Corporation's motion for a directed verdict. "A motion for a directed verdict shall state the specific grounds therefor." I.R.C.P. 50(a). The specific grounds pressed at trial were that the counterclaim was not a proper defense to the Corporation's original claim and that it was barred by the statute of limitations. On appeal, it is argued that the counterclaim was not supported by sufficient evidence. We believe that the requirement of I.R.C.P. 50(a), that specific grounds for the motion for a directed verdict be stated at trial, restricts the scope of review on appeal. Since the grounds urged at trial differed from the ground pressed on appeal, we decline to address the propriety of the denial of the Corporation's motion for directed verdict.
Nevertheless, we may still address the sufficiency of the evidence in connection with issue four  whether there was sufficient evidence to instruct the jury on the theory of unjust enrichment. Procedurally, this case comes to us from the denial of a motion for judgment n.o.v.[1] This is an appealable order under I.A.R. 11(a)(4). An appeal from such a denial is also deemed to include and present all interlocutory judgments, orders and decrees. I.A.R. 17(e). We conclude that this rule encompasses the Corporation's objection to the jury instruction and it may therefore press its objection on appeal.
An instruction should be given only if it is based on evidence adduced at trial. Everton v. Blair, 99 Idaho 14, 576 P.2d 585 (1978). If the evidence was insufficient to support a recovery on the theory of unjust enrichment, it was error to instruct the jury on that theory. See Owen v. Taylor, 62 Idaho 408, 114 P.2d 258 (1941). "The essence of an action based upon unjust enrichment is the claim that the defendant has been enriched by the plaintiff and that it would be inequitable for the defendant to retain that benefit without compensating the plaintiff for the value of the benefit." Gillette v. Storm Circle Ranch, 101 Idaho 663, 666, 619 P.2d 1116, 1119 (1980). The evidence would therefore be sufficient to justify the instruction if the jury could reasonably have found from the evidence: (1) that the Corporation had been benefitted by Smith's services; and (2) the value of the benefit unjustly retained. See also Cablevision of Breckenridge, Inc. v. Tannhauser Condominium Ass'n, 649 P.2d 1093 (Colo. 1982). We must examine all of the evidence to determine whether it is sufficient. Nordquist v. The W.A. Simons Co., 54 Idaho 21, 28 P.2d 207 (1933). Of course, the burden was upon Smith to prove facts showing that the Corporation received a benefit and *85 also the amount of that benefit which the Corporation unjustly retained. Gillette, supra.
That the Corporation was benefitted by Smith's services is evident from the record. During the first four months Smith worked, he was paid $700 per month as salary, even though he was totally inexperienced in the insurance field. Following that period, he worked eight and one-half months, until he resigned. It is significant that Smith resigned  he was not fired. Thus, the facts that Smith was paid a salary while he was yet inexperienced and that the Corporation did not fire him, but rather would presumably have continued to employ him, are two indications that the Corporation derived some benefit from his services.
More difficult is the question of whether there was sufficient evidence for the jury to find the value of the benefit unjustly retained by the Corporation. The only evidence adduced at trial regarding the value of that benefit is as follows. The employment agreement between Smith and the Corporation provided for a salary of $700 per month for the first four months. Smith testified that thereafter he worked without an agreement until he resigned  eight and one-half months later. During that period he received a draw of $750 per month against the commissions he would earn. At the end of Smith's employment, he owed the Corporation in excess of $4,000, according to the Corporation's president. The amount was the difference between the advances received by Smith and the total of his salary and earned commissions. The Corporation took Smith's promissory note for $4,000 in settlement of the claimed amount.[2] This means that, for the services Smith performed and for the insurance sales he made during the last eight and one-half months, he actually received less than $300 per month. This is contrasted with the $700 per month salary he received for the first four months of his employment.
Smith further testified that the "norm" for an insurance agent coming into the business, at the time he was working, was $700 per month salary, $200 per month draw on commissions and $200 per month car allowance. The Corporation objected to introduction of this testimony on the grounds that no proper foundation had been laid. The district court overruled the objection. We conclude that the court erred in admitting the testimony. Generally, "[t]he lay witness should, as far as possible, first give the factual information upon which his opinion or inference was formed. This permits the judge to determine if the opinion or inference is admissible... ." G. BELL, HANDBOOK OF EVIDENCE FOR THE IDAHO LAWYER 59 (2d ed. 1972). Accord McCORMICK, HANDBOOK OF THE LAW OF EVIDENCE § 10 (Cleary ed.2d 1972). Furthermore, even if a witness were qualified as an expert, "it is essential that the jury understand what facts the expert is using in arriving at his opinion." G. BELL, supra, at 66.
In the present case, Smith testified that he was not familiar with the salary "norms" at the time he was employed by the Corporation. He stated: "After I left [the Corporation] is when I became very familiar with the practices." There is nothing in the record, however, to indicate how he came to know what the "norm" was when he worked for the Corporation. His opinion was therefore without factual basis and inadmissible. We must decide then whether the remaining evidence was sufficient for a jury to reasonably arrive at a value for the benefit.
We can never know what the jury actually did in computing the award to Smith, but we can deduce what probably occurred. Smith earned $700 per month for his first four months. Thereafter, he worked eight and one-half months without *86 a fixed salary. Applying his initial salary to the eight and one-half months period yields a figure of $5,950. This is precisely the figure at which the jury arrived in its verdict on the counterclaim. We hold that this manner of calculation was proper for the purpose of arriving at the reasonable value of Smith's services.
The district court, however, instructed the jury on the theory of unjust enrichment. The measure of recovery under this theory is that part of the benefit bestowed by Smith upon the Corporation which, if retained by the Corporation, would result in its unjust enrichment. Gillette v. Storm Circle Ranch, supra. This is to be contrasted with the measure of damages under the theory of quantum meruit, which is the reasonable value of the services rendered. There seems to be a continuing confusion of these two theories of recovery. See e.g., Interform Co. v. Mitchell, 575 F.2d 1270 (9th Cir.1978), and the dissents in Gillette, supra. Suffice it to say that Interform and the dissents in Gillette merely point out that the result under both theories is often the same. The method of measuring damages, on the other hand, is quite different, as indicated earlier. We see no need, however, to blur the distinction between the theories and use the terms interchangeably simply because in some cases it does not change the result. See Peavey v. Pellandini, 97 Idaho 655, 551 P.2d 610 (1976). Such shortcuts cause more harm than good in leading to the confusion noted among the members of the bar and the judiciary. The fact of the matter is that the results are not always the same under the two methods of measuring damages, as we show later.
This is not to say that there is no overlap between the two theories. While unjust enrichment is measured in terms of the value of the benefit to, in this case, the Corporation, the value of Smith's services can be used as evidence of the value of that benefit, as we have shown. D. DOBBS, HANDBOOK ON THE LAW OF REMEDIES § 4.5 at 261 (1973). However, the jury needs to take this one step further and determine the amount of the benefit which, if retained by the Corporation, would result in its unjust enrichment.
In the present case, however, the instructions both perpetuate the confusion surrounding quantum meruit and unjust enrichment, and offer little guidance to the jury for determining the amount of unjust enrichment. First, the district judge gave instruction number seven as part of his final instructions to the jury at the close of all of the evidence. This instruction included a statement of the respective contentions of the parties. The jury was told that Smith was claiming "the value of [his] service during the period of time defendant was working for [the Corporation] was in the sum of $9,600; ... and that [the Corporation] has been unjustly benefited by reason of [Smith's] services and that [Smith] is entitled to reasonable conpensation [sic] for such services in the sum of $9,600." Instruction number eight said, in part "that the foregoing statements of the claims of the parties ... are given to you to acquaint you with the issues to be tried in this case."
This explanation of Smith's counterclaim seems to equate "reasonable compensation" for Smith's services with the amount the Corporation was "unjustly benefited." This is inaccurate. Had instructions seven and eight been given at the start of the trial  as recommended in the Idaho Jury Instructions (IDJI) at 150 (1st ed 1974) (now replaced by the 1982 edition at 102)  the effect of this instruction on the jury's finding would possibly have been minimal. However, coming as it did at the same time as instruction number twelve on unjust enrichment, the three instructions created confusion regarding the proper measure of recovery and how to calculate it.
From the record a question arises as to whether the jury, considering only admissible evidence, found the amount of the benefit unjustly retained was $5,950, or whether the jury merely decided the value of the benefit bestowed was $5,950? Second, instruction number twelve, by itself, does not make it clear that there is a distinction *87 between the benefit received and the value of the benefit unjustly retained. Therefore, particularly in view of instruction seven, it is reasonable to assume that the jury made no such distinction. We must assume, therefore, that the jury's verdict on Smith's counterclaim was intended to fix the reasonable value of Smith's services to the Corporation, or, in other words, the amount of the benefit received by the Corporation. As the dissents in Gillette, supra, point out, in many cases the "amount of the benefit received" will be equivalent to the amount of the unjust enrichment. But that is not true in this case.
Here, we know that Smith received $750 per month draw for eight and one-half months, or a total of $6,375. At the end of his employment he obligated himself to pay back $4,000 of that amount. This left him with $2,375 for the period, or approximately $280 per month. Therefore, if the jury by its verdict determined that the value of the benefit received by the Corporation was $700 per month or a total of $5,950, then the amount of the unjust enrichment had to be $5,950 less $2,375, or $3,575. On the other hand, the jury could have thought that the Corporation was unjustly enriched for the total of $5,950 over and above the $2,375 kept by Smith. There is, however, no competent, admissible evidence in the record to support such a verdict.
We take note of the fact here also that based upon pleadings in the counterclaim the district judge indicated to counsel at the close of the evidence, he would instruct on quantum meruit. Instead, the following morning counsel were provided with instruction number twelve on unjust enrichment. Considering the evidence that was admitted at trial, we cannot say it was improper to instruct the jury on unjust enrichment, although there is nothing in the record before us to show that Smith requested the particular instruction on this theory. On the other hand, he made no objection to this instruction at trial. He was also under a duty to submit proper instructions on his theories of the case.
We believe the Corporation was entitled to have an instruction given that would clearly inform the jury how to arrive at the amount of unjust enrichment. This, instruction twelve did not do. As a result, we conclude it is necessary to set aside the order denying the judgment n.o.v. However, the relief asked for by the Corporation  to enter judgment for the Corporation on its complaint  is not the relief which should be granted.
Since the evidence and the instruction as given would have permitted the jury to find that the Corporation was unjustly enriched in the amount of $3,575, we could uphold a judgment that recognized such an offset against the $5,950 due on the note. If, however, Smith is not willing to accept such a result, then the court should conduct a new trial on the issues raised by the counterclaim. In either event, the court should determine who is the prevailing party in the action and whether that party is entitled to an award of attorney fees. If the district court determines that the Corporation is the prevailing party, in whole or in part, the court may take this appeal into consideration when determining an appropriate award as provided in the promissory note or under I.C. § 12-120.

III
The final issue raised on appeal is whether the verdict form submitted to the jury improperly suggested that if Smith was entitled to an offset, such offset was necessarily equal to the amount found due on the note. This issue is without merit. We recognize first that the verdict forms submitted to the jury were not the forms recommended by the Idaho Jury Instructions. See IDJI 141, 141.1 (1974). See also IDJI 51.1 (1974). Even assuming that the verdict form created the problem foreseen by the Corporation, however, instruction thirteen clearly made up for any shortcomings in the verdict form itself. Instruction thirteen stated in part: "If you decide for the defendant on the defendant's Counter Claim against the plaintiff, then you will determine what amount of money should *88 be offset against any sums you find due from defendant to plaintiff on plaintiff's Complaint."
Because of this instruction, the jury could not have interpreted the verdict form as suggested by the Corporation. Read together, the instruction and the verdict form could not mean that the district court was requiring the jury to find that any offset was necessarily equal to the amount due on the note. The jury itself demonstrated its understanding of this fact by amending the verdict form to provide a space for indicating the amount due on the counterclaim. If they had believed that the amount due on the counterclaim had to equal the amount due on the note, their amendment would have been a meaningless and futile gesture.
"In any event, even if error were deemed to exist, a party attacking a jury instruction must also demonstrate prejudice." Packard v. Joint School Dist. No. 171, 104 Idaho 604, 612, 661 P.2d 770, 778 (Ct.App. 1983). We believe that this same rule should apply to verdict forms. Since the jury instruction compensated for any confusion resulting from the imprecise verdict form, no prejudice has been shown. The error was therefore harmless. See Id. However, if there is a retrial of the counterclaim more appropriate verdict forms should be provided.
The cause is remanded to the district court for proceedings consistent with this opinion. Costs to appellant. No attorney fees awarded on appeal.
WALTERS, C.J., and BURNETT, J., concur.
NOTES
[1]  Since no judgment appears to have been entered by the district court, the appeal is based on the court's denial of the Corporation's motion for judgment n.o.v.  the only independently appealable order entered in this case.
[2]  The defense of accord and satisfaction was not pled in the reply to the counterclaim or presented to the jury.
