
628 N.E.2d 581 (1993)
256 Ill. App.3d 897
195 Ill.Dec. 117
TELENOIS, INC., Plaintiff-Appellee,
v.
VILLAGE OF SCHAUMBURG, Defendant-Appellant.
No. 1-92-0871.
Appellate Court of Illinois, First District, Fifth Division.
December 3, 1993.
*582 Altheimer & Gray, Chicago, for defendant-appellant (Jack M. Siegel, of counsel).
McDermott, Will & Emery, Chicago, for plaintiff-appellee (James E. Betke, of counsel).
Justice COUSINS delivered the opinion of the court:
Telenois, Inc. (Plaintiff) brought an action against the Village of Schaumburg (Defendant) seeking to recover $100,000 that defendant took and retained pursuant to a provision of a cable television franchise agreement executed between the parties. Plaintiff filed a motion for summary judgment. The trial court entered summary judgment in plaintiff's favor based on count III of its complaint which alleged that the provision of the agreement (letter of credit clause) imposed a penalty and was, therefore, unenforceable as a matter of law. Defendant appealed.
The issues presented for review are (1) whether the letter of credit clause in the *583 agreement was enforceable, and (2) whether a party to a contract which is allegedly contrary to public policy is estopped from challenging a contract's purported illegality as a defense.
We affirm.

BACKGROUND
Effective December 1, 1987, plaintiff, a cable television franchise, and defendant entered into an amended franchise agreement whereby plaintiff would provide cable television services to defendant's residents. Pertinent here, section 31 (System Reconfiguration) of the contract provided:
"With the signing of this Agreement Section, Franchisee [Telenois] shall reconfigure the system as follows:
(a) The Village will be served from a headend located within the Village limits.
(b) The cable plant will be converted from an active dual-trunk system to a single-trunk active system, with the physical integrity of the second trunk maintained for use as a backup. The active electronics of the second cable shall be removed.
(c) In areas currently served, amplifier cascades will be significantly reduced to worst-case levels of 25 amplifiers from the current level of 35 amplifiers.
(d) The return-line currently connected to Village Hall will be extended to the Prairie Center for the Arts to allow live cablecasting from the Prairie Center.
(e) Two monitors will be installed inside the Village Hall to allow alphanumeric messages to be shown to visitors in the main business areas.
This system reconfiguration will be completed by December 31, 1988. Franchisee will provide the Village with an unconditional Letter of Credit in the amount of One Hundred Thousand Dollars ($100,000) to be payable to the Village. In the event the Franchisee fails to complete this reconfiguration by December 31, 1988, the Village will collect the full amount as a penalty." (Emphasis added.)
Plaintiff issued a standby letter of credit in defendant's favor in the amount of $100,000. This section was drafted by defendant's consultant, Dr. Barry Orton (Dr. Orton). Defendant understood the $100,000 to be a penalty which would be used as an impetus to insure completion of the reconfiguration in a timely manner. The reconfiguration completion date and the letter of credit deadline were extended by agreement from December 31, 1988, to February 10, 1989.
The provisions of section 31(b), which relate to the conversion from a dual-trunk system to a single-trunk system, were at issue.
In his January 6, 1989, report, Dr. Orton stated that as of January 2, 1989, plaintiff had completed 98% of the conversions and that plaintiff was in substantial compliance with the agreement. He further noted that of the 226 subscribers who had not yet been converted, some had probably been away during the holiday period. Plaintiff could not complete the conversions without gaining access to some of the subscribers' homes.
In late January of 1989, defendant requested Dr. Orton to make a second inspection of the reconfiguration work and to issue a second report. Dr. Orton conducted his inspection on January 31, 1989, and in a report, dated February 2, 1989, found that plaintiff had completed 99% of the conversions, based on a report from plaintiff that there were only 30 to 40 homes not yet converted. Dr. Orton concluded his February 2nd report by stating that he still considered plaintiff to be in substantial compliance with the agreement.
On February 10, 1989, defendant drew down the $100,000 proceeds of the letter of credit even though it conducted no further inspections after January 31, 1989. Its February 10th acquisition of the entire proceeds of the letter of credit was based on Dr. Orton's inspection and report dated respectively January 31st and February 2nd.
Plaintiff filed suit to recover the $100,000. In its three count amended complaint, it alleged that it had completely performed its requirements under section 31 (count I); that it had substantially performed those requirements (count II); and that in all events the provision of section 31 relating to the $100,000 was void because it imposed a penalty rather than a valid liquidated damages clause (count III).
*584 Following completion of discovery, plaintiff moved for summary judgment on counts II and III. The court granted the motion as to count III, but made no ruling on the motion as to count II. Defendant appealed from the entry of summary judgment in plaintiff's favor on count III.

OPINION
Plaintiff, in conjunction with filing its response to defendant's brief, asserts that this appeal should be dismissed because, although the court had entered summary judgment as to count II, the other two counts were not dismissed before defendant filed its notice of appeal.
During oral argument, plaintiff's counsel advised the court that counts I and II were later dismissed. Although counts I and II were still pending at the time the court granted summary judgment as to count III, an appellate court decision on count III will terminate the litigation. We deny plaintiff's motion to dismiss and consider the appeal as it pertains to count III.
Appellate courts apply a de novo standard when reviewing summary judgment motions. Outboard Marine Corp. v. Liberty Mutual Insurance Co. (1992), 154 Ill.2d 90, 102, 180 Ill.Dec. 691, 607 N.E.2d 1204.
Summary judgment is appropriate when there are no genuine issues of material fact and the moving party is entitled to judgment as a matter of law. (Purtill v. Hess (1986), 111 Ill.2d 229, 240, 95 Ill.Dec. 305, 489 N.E.2d 867.) The purpose of summary judgment is not to try an issue of fact, but rather to determine whether a triable issue of fact exists. (Quality Lighting, Inc. v. Benjamin (1992), 227 Ill.App.3d 880, 883, 169 Ill.Dec. 890, 592 N.E.2d 377.) Where a reasonable person could draw divergent inferences from undisputed facts, summary judgment should be denied. Pyne v. Witmer (1989), 129 Ill.2d 351, 358-59, 135 Ill.Dec. 557, 543 N.E.2d 1304.
While use of summary judgment is encouraged under Illinois law to aid the expeditious disposition of a lawsuit, Purtill, 111 Ill.2d at 240, 95 Ill.Dec. 305, 489 N.E.2d 867, it is a drastic means of disposing of litigation and should be allowed only when the right of the moving party is clear and free from doubt. Quality Lighting, 227 Ill.App.3d at 883-84, 169 Ill.Dec. 890, 592 N.E.2d 377.
For the reasons discussed below, we hold that the trial court properly entered summary judgment in plaintiff's favor.

I.
While defendant contends that the letter of credit clause was enforceable, plaintiff contends that the clause was unenforceable because it was a penalty in violation of public policy. We agree with plaintiff.
Public policy is the principle that no one may lawfully do that which has a tendency to injure the public welfare. (O'Hara v. Ahlgren, Blumenfeld & Kempster (1989), 127 Ill.2d 333, 341, 130 Ill.Dec. 401, 537 N.E.2d 730.) Whether a contract is contrary to public policy depends on the peculiar facts and circumstances of each case. O'Hara, 127 Ill.2d at 342, 130 Ill.Dec. 401, 537 N.E.2d 730.
Courts will not enforce a private agreement that is contrary to public policy. (O'Hara, 127 Ill.2d at 341, 130 Ill.Dec. 401, 537 N.E.2d 730.) Quoting section 356 of the Restatement (Second) of Contracts (1981), our Appellate Court in Pav-Saver Corp. v. Vasso Corp. (1986), 143 Ill.App.3d 1013, 97 Ill.Dec. 760, 493 N.E.2d 423, stated:
"(1) Damages for breach by either party may be liquidated in the agreement but only at an amount that is reasonable in the light of the anticipated or actual loss caused by the breach and the difficulties of proof of loss. A term fixing unreasonably large liquidated damages is unenforceable on grounds of public policy as a penalty." Pav-Saver, 143 Ill.App.3d 1013, 1018-19, 97 Ill.Dec. 760, 493 N.E.2d 423.
Although a nonbreaching party may recover only damages to the extent of injury, parties may specify a particular sum in liquidation where actual damages would be difficult to ascertain. (H & M Driver Leasing Services, Unlimited, Inc. v. Champion International Corp. (1989), 181 Ill.App.3d 28, 31, 129 Ill.Dec. 808, 536 N.E.2d 858.) However, if the purpose of a clause fixing damages *585 is merely to secure a party's performance, it will be treated as a penalty and only actual damages proven can be recovered. (H & M Driver, 181 Ill.App.3d at 31, 129 Ill.Dec. 808, 536 N.E.2d 858.) Where a contract provides that the breaching party must pay all damages caused by the breach as well as a specified sum in addition thereto, the sum so specified can be nothing but a security for performance which constitutes an unenforceable penalty. H & M Driver, 181 Ill.App.3d at 31, 129 Ill.Dec. 808, 536 N.E.2d 858.
Here, section 31 of the contract expressly provided that the $100,000 letter of credit would be payable "[i]n the event Franchisee [plaintiff] fails to complete this reconfiguration by December 31, 1988 * * *," and that defendant would collect "the full amount as a penalty."
Moreover, George Longmeyer (Longmeyer) defendant's manager, testified at his deposition that
"[t]he purpose of the letter of credit was to insure that they would [complete the reconfiguration in a timely manner]; and if they didn't, that letter of credit was to serve as a penalty to do so because of their lousy track record in the past of not completing things. That was the whole purpose of that letter of credit."
Likewise, Dr. Orton, defendant's cable consultant and drafter of section 31, wrote in his January 6th report that
"[t]o assure that the reconfiguration was accomplished in a timely manner, the Village required the $100,000 letter of credit, and structured it so as to be able to cash it as a penalty in the event of non-completion."
Defendant, on page 13 of its brief also conceded that section 31 imposed a penalty provision. As such, the letter of credit clause was against public policy and, therefore, unenforceable. See O'Hara, 127 Ill.2d at 341, 130 Ill.Dec. 401, 537 N.E.2d 730.

II.
Defendant asserts that even if section 31 constituted a penalty provision and was against public policy, that plaintiff cannot recover. We disagree.
As support, defendant cites Schnackenberg v. Towle (1954), 4 Ill.2d 561, 123 N.E.2d 817. This case stands for the proposition that where a contract is illegal or against public policy, a court will not, at the urging of one of the parties, compel the execution of the agreement or set it aside after it has been executed, because to give such relief would injure and counteract the public good. (Schnackenberg, 4 Ill.2d at 565, 123 N.E.2d 817.) We agree with the Schnackenberg rule. However, the rule is inapplicable to this case.
Schnackenberg involves an illegal contract. There is a distinction between having a contract which is illegal and against public policy on the one hand and having a clause of a contract which is illegal and against public policy on the other hand. See Kosuga v. Kelly (1958), 257 F.2d 48, 54, where the United States Court of Appeals found that the allegedly illegal contractual provision, while part of the same contract, was separable from and not inherent in defendant's promise to pay.
In the instant case, the performance of the contract is legal. Neither party argues otherwise. Only the letter of credit clause violates public policy. Therefore, only the clause must fall.
Defendant also contends that plaintiff has accepted and secured benefits of the contract and, therefore, is estopped from challenging the letter of credit clause's enforceability. In support of this argument, defendant cites Zweifel Manufacturing Co. v. City of Peoria (1957), 11 Ill.2d 489, 144 N.E.2d 593; People v. Suburban R.R. Co. (1899), 178 Ill. 594, 53 N.E. 349; and Plote, Inc. v. Minnesota Alden Co. (1981), 96 Ill. App.3d 1001, 52 Ill.Dec. 550, 422 N.E.2d 231.
In Zweifel, petitioners brought an action against the city to have the court declare invalid certain conditions imposed on petitioners by the city zoning board in connection with the granting of a variation. The condition placed restraints on the use of property involved. Zweifel, 11 Ill.2d at 492-93, 144 N.E.2d 593.
*586 In Suburban, the railroad company, having secured benefit of a franchise, sought to challenge a condition that had been imposed by the city which provided that the fare would not exceed that charged patrons from another town on the line. Suburban, 178 Ill. at 606-07, 53 N.E. 349.
In Plote, the petitioners challenged the condition the village had imposed which involved a municipal exaction for a community cultural center. Plote, 96 Ill.App.3d at 1003, 52 Ill.Dec. 550, 422 N.E.2d 231.
The agreements and conditions in the aforementioned cases do not contain a penalty clause for nonperformance of a contract. Thus, the cases cited by defendant are inapplicable.
Defendant next asserts that plaintiff is estopped from challenging its right to draw down a letter of credit which is contrary to public policy. We disagree.
A party to a contract, or a provision thereof, that is contrary to public policy is not precluded from raising its illegality as a defense. (O'Hara, 127 Ill.2d at 349, 130 Ill. Dec. 401, 537 N.E.2d 730.) Therefore, defendant's estoppel theory is inapplicable. The trial court properly entered summary judgment in plaintiff's favor.
Judgment affirmed.
MURRAY and McNULTY, JJ., concur.
