
104 Ill. App.3d 357 (1982)
432 N.E.2d 999
INDUSTRIAL LIFT TRUCK SERVICE CORPORATION, Plaintiff-Appellant,
v.
MITSUBISHI INTERNATIONAL CORPORATION, Defendant-Appellee.
No. 81-11.
Illinois Appellate Court  First District (4th Division).
Opinion filed February 4, 1982.
*358 Moriarty, Hultquist, McDevitt and Howlett, Ltd., of Chicago (Maurice J. Moriarty and Richard F. Hudzik, of counsel), for appellant.
Masuda, Funai, Eiffert & Mitchell, Ltd., of Chicago (James R. Mitchell and Sally Hastings, of counsel), for appellee.
Order affirmed.
JUSTICE LINN delivered the opinion of the court:
Plaintiff, Industrial Lift Truck Service Corporation, appeals from an order entered in the circuit court of Cook County which dismissed three counts of plaintiff's five-count second amended complaint. The counts dismissed were III, IV, and V. The primary issues on appeal are whether counts III and IV stated a valid cause of action for recovery in quasi-contract, and whether count V was barred by the previous dismissal of three counts of plaintiff's first amended complaint.
We affirm.

BACKGROUND
Plaintiff, Industrial Lift, is an Illinois corporation in the business of selling and servicing fork-lift trucks. Defendant, Mitsubishi International Corporation, is the United States distributor of fork-lift trucks manufactured by Nippon Yusoki Corporation of Japan. In 1973, plaintiff and defendant entered into a dealership agreement under which plaintiff would purchase fork-lift trucks from defendant and use its best efforts to sell the trucks to plaintiff's customers. Plaintiff was also required to service the trucks it sold under the manufacturer's warranty.
In November 1976, the original agreement was terminated and replaced by a new agreement under which plaintiff would use its best efforts to sell and service defendant's product. The agreement contained numerous terms and was designated to be the entire and exclusive agreement of the parties and could be amended only by written agreement. The terms in the contract important to this case were the following:
(1) defendant could terminate the agreement without cause by giving 90 days written notice except that such termination could not occur during the first year of the agreement;
(2) following termination, defendant would not be liable for any losses incurred by plaintiff as a result of termination.
From 1973 through 1977, plaintiff enjoyed success in selling defendant's *359 product and allegedly became the nation's largest dealer in the product as a result of "great expenditures of time, effort, and money." Among the "great expenditures of time, effort, and money" were expenditures that went into making several design changes, which we need not detail, in defendant's product. These design changes were made by plaintiff because it believed them necessary to adapt defendant's Japanese product to an American market. The changes were not made because of any express or implied request or demand by defendant. Apparently, plaintiff sold many trucks with the design changes, and eventually defendant incorporated the changes into the products it sold to its other dealers.
In August 1978, defendant sent plaintiff notice of termination of the dealership agreement. Defendant cited as cause plaintiff's declining sales in the previous year, but indicated that it was exercising its right to terminate under the 90-day notice-of-termination-without-cause term in the contract. Thereafter, plaintiff brought this action. Of importance here are parts of plaintiff's first amended complaint and second amended complaint.
Plaintiff's first amended complaint contained three counts based on breach of contract. In these counts, plaintiff alleged that the dealership agreement was a transaction involving goods under the Uniform Commercial Code. (Ill. Rev. Stat. 1979, ch. 26, par. 2-102.) In one count, plaintiff, citing the Commercial Code, alleged that defendant had an obligation under the contract to act in good faith. (Ill. Rev. Stat. 1979, ch. 26, par. 1-203.) Plaintiff contended that termination of the agreement without cause violated the duty of good faith and constituted breach of contract. In another count, plaintiff, citing the Commercial Code, alleged that defendant was required to give reasonable notice of termination. (Ill. Rev. Stat. 1979, ch. 26, par. 2-309(3).) Plaintiff contended that the 90-day notice of termination given was unreasonable because it did not give plaintiff sufficient time to recoup the expenses it had incurred in making the design changes. In a third count, plaintiff contended that the notice of termination given did not comply with the terms of the contract and thus the termination was improper and constituted breach of contract.
The above three counts of the first amended complaint were dismissed with prejudice and with a finding that there was no just reason to delay enforcement or appeal of the dismissal order. The order was entered on April 22, 1980. No appeal was taken. Plaintiff's second amended complaint, filed on May 23, 1980, included count V which is now before us. In this count, plaintiff alleged that the dealership agreement was a contract of adhesion and as a result the 90-day notice-of-termination-without-cause term of the contract was invalid and defendant's termination of the contract without cause constituted breach of *360 contract. The trial court dismissed this count finding that it was barred by its order dismissing the three breach-of-contract counts in the first amended complaint.
The first amended complaint also contained a count seeking recovery based on quasi-contract principles. This count was dismissed with leave to amend. As a result, plaintiff, in its second amended complaint, brought two counts, III and IV, seeking recovery based on quasi-contract principles. Though the parties on appeal have attempted to argue distinctions in the two counts, except for some minor additions and changes, we find that count IV is merely a repetition of count III, and we will treat the counts as one. Other than the facts which have already been set out in this opinion, these two counts alleged that defendant was profitting from the design changes made by plaintiff, that defendant had failed to reimburse plaintiff for the costs incurred in developing the design changes, that defendant's retention of the benefits accruing to it as a result of the design changes was unjust, and that plaintiff should receive restitution for those benefits including the reasonable value of the expenses plaintiff had incurred in developing the design changes. The quasi-contract counts of the second amended complaint were dismissed as failing to state a cause of action.

OPINION

I

Quasi-contract
A contract implied in law, or a quasi-contract, is fictitious and arises by implication of law wholly apart from the usual rules relating to contract. (Town of Montebello v. Lehr (1974), 17 Ill. App.3d 1017, 309 N.E.2d 231.) Quasi-contractual claims involving services usually arise when there is no contract, either express or implied, between the parties. One party performs a service that benefits another. The benefitting party has not requested the service but accepts the benefit. Circumstances indicate that the services were not intended to be gratuitous. As a result, the law will sometimes impose a duty on the benefitting party to pay for the services rendered despite the lack of a contract. See Hamilton v. American Gage & Machine Corp. (1976), 35 Ill. App.3d 845, 342 N.E.2d 758.
 1 Difficulties arise with quasi-contractual claims when there is an express contract between the parties. The general rule is that no quasi-contractual claim can arise when a contract exists between the parties concerning the same subject matter on which the quasi-contractual claim rests. (See La Throp v. Bell Federal Savings & Loan Association (1977), 68 Ill.2d 375, 370 N.E.2d 188, cert. denied (1978), 436 U.S. 925, 56 L.Ed.2d *361 768, 98 S.Ct. 2818; Goodman v. Motor Products Corp. (1959), 22 Ill. App.2d 378, 161 N.E.2d 31.) The reason for this rule is not difficult to discern. When parties enter into a contract they assume certain risks with an expectation of a return. Sometimes, their expectations are not realized, but they discover that under the contract they have assumed the risk of having those expectations defeated. As a result, they have no remedy under the contract for restoring their expectations. In desperation, they turn to quasi-contract for recovery. This the law will not allow. Quasi-contract is not a means for shifting a risk one has assumed under contract. See Tondre v. Pontiac School District No. 105 (1975), 33 Ill. App.3d 838, 342 N.E.2d 290.
Plaintiff asserts its complaint states a valid cause of action in quasi-contract despite the existence of a contract because the contract does not cover the specific service plaintiff rendered  the development of the design changes. It is perhaps true that the contract did not expressly cover the design changes, but it does not follow that an action in quasi-contract is therefore allowable. If a quasi-contract action could be brought every time a party under contract performs a service not precisely covered by the contract, then the rule preventing quasi-contract actions when a contract exists would have little meaning. Parties to a contract often perform services not expressly demanded by the contract. They do so to enhance their position under the contract and not because they expect a different remuneration for those services from what they could receive under the contract.
In the present case, plaintiff obviously made the design changes with a view to being compensated pursuant to the contract terms. By its own admission, the design changes allowed plaintiff to become one of the nation's largest dealers in defendant's product. When the changes were made, plaintiff knew the risk involved. It knew the contract could be terminated as it was terminated, and thus knew when it made the changes that it might not be compensated under the contract to the extent it hoped to be compensated. Now that a situation plaintiff knew could occur has occurred, plaintiff seeks to shift a risk it assumed in light of the contract to defendant. In essence, plaintiff is seeking to use quasi-contract as a means to circumvent the realities of a contract it freely entered into.
Moreover, the contract was declared to be the entire agreement of the parties and could only be amended by express agreement of the parties. Plaintiff was forewarned that any changes in the agreement could only be made with the express consent of defendant. If the services rendered bore a reasonable relationship to the contract, it was incumbent upon plaintiff to seek an amendment to the agreement if plaintiff expected more compensation than it could recover pursuant to the contract terms.
*362 The contract defined the entire relationship of the parties with respect to its general subject matter  the sale and servicing of defendant's products. Plaintiff's attempt here to bring a quasi-contract action is nothing more than an attempt to unilaterally amend the agreement in a manner prohibited by the agreement. In such circumstances, the benefit received by defendant can hardly be considered unjust. (See) Tondre v. Pontiac School District No. 105 (1975), 33 Ill. App.3d 838, 342 N.E.2d 290.) Defendant had a right to assume that the contract defined the entire relationship of the parties with respect to all matters related to defendant's product. Defendant had a right to assume, absent a valid amendment to the agreement, that it should not have to compensate plaintiff for any acts done in relation to the subject matter of the contract except pursuant to the contract terms.
 2 Accordingly, we must hold that the contract in this case barred plaintiff's action in quasi-contract and that plaintiff's counts in quasi-contract were properly dismissed.

II

Res judicata
The second issue we must determine is whether count V of plaintiff's second amended complaint was barred by the dismissal of the three breach-of-contract counts contained in plaintiff's first amended complaint.
 3 Issues of bar and estoppel by judgment may arise in the same proceeding. (Van Slambrouck v. Marshall Field & Co. (1981), 98 Ill. App.3d 485, 424 N.E.2d 679.) In the present case, three counts of plaintiff's first amended complaint were dismissed with prejudice and no just reason to delay enforcement or appeal. As a result, plaintiff was prohibited from attempting to bring the same or a similar cause of action in its second amended complaint as the cause of actions dismissed in the first amended complaint. Van Slambrouck v. Marshall Field & Co.
Plaintiff contends that count V of the second amended complaint could be maintained despite the previous dismissal because count V alleged the contract was one of adhesion and plaintiff had not pursued such a contention in the first amended complaint. Plaintiff's argument is too narrow an interpretation of what was determined when its first amended complaint was dismissed. All counts alleging breach of contract in the first amended complaint were dismissed with prejudice. One of the primary allegations asserted in plaintiff's breach-of-contract claims was the unreasonableness of the 90-day notice of termination provision of the contract. When the trial court dismissed those counts it in effect held that the contract was not breached and that the 90-day notice of termination provision in the contract was valid and reasonable. Count V of plaintiff's *363 second amended complaint was merely an attempt to plead over that the contract was breached and that the 90-day notice of termination provision was unreasonable and invalid. Plaintiff was barred from doing this. To attempt to call the contract one of adhesion was merely an attempt to relitigate that which had already been determined against plaintiff under a similar theory. Thus, we find that count V of plaintiff's second amended complaint was barred by the previous dismissal of the three breach-of-contract counts in the first amended complaint.
For the reasons noted, we affirm the trial court's order dismissing counts III, IV and V of plaintiff's second amended complaint.
Affirmed.
JIGANTI and ROMITI, JJ., concur.
