
518 N.W.2d 652 (1994)
246 Neb. 334
CAE VANGUARD, INC., a Delaware Corporation, Appellee,
v.
Maurice NEWMAN, Appellant.
No. S-93-340.
Supreme Court of Nebraska.
July 8, 1994.
*653 Gary J. Nedved, of Bruckner, O'Gara, Keating, Hendry, Davis & Nedved, P.C., Lincoln, for appellant.
Michael L. Jeffrey, of Jeffrey, Hahn & Hemmerling, P.C., Lincoln, for appellee.
HASTINGS, C.J., and BOSLAUGH, WHITE, CAPORALE, FAHRNBRUCH, LANPHIER, and WRIGHT, JJ.
BOSLAUGH, Justice.
The appellee, CAE Vanguard, Inc., filed a suit to enjoin the appellant, Maurice Newman, from violating the terms of a noncompetition agreement which was signed in conjunction with the sale of stock. Newman admits that he violated the agreement, but claims that the agreement is unenforceable.
Vanguard Pacific Metal Builders of Kentucky and VMB Company assigned their rights under the noncompetition agreement to CAE Vanguard, Inc. (the companies are hereinafter referred to collectively as Vanguard). Vanguard is in the business of rebuilding railroad car axles. The rebuilding process consists of either downsizingthe milling of a worn axle into a smaller axleor *654 brush platinga process of electrochemically metalizing a worn axle such that it conforms to industry standards. Through the use of trade secrets developed for brush plating, Vanguard had become the largest railroad axle brush plater in North America, servicing 90 percent of the electrochemically metalized axles in the United States and Canada.
Newman worked as a plant manager for Vanguard and performed a variety of tasks, including development of shop procedures and pricing schedules, quality control, and sales. During his tenure with Vanguard, he acquired intimate knowledge of Vanguard's trade secrets and 10 percent of its stock.
Newman left Vanguard in 1989 and sold his stock to the other three stockholders. In conjunction with the sale and with benefit of legal counsel, Newman signed an agreement not to compete with Vanguard's business of brush plating railroad axles or to divulge trade secrets pertaining thereto. The provision in the covenant not to compete, in pertinent part, states:
Newman agrees and covenants that he will not, for a period of five (5) years after the date of this Covenant, and anywhere in the United States, the continent of North America, or anywhere else on earth, or such lesser period of time or geographical area restriction as a court of law might later determine to be the limits of enforceability of this covenant, (a) directly or indirectly solicit electrochemical metalizing business regarding railroad axles and/or mounted wheel sets....
Newman argues that the covenant against competition in this case was designed not to eliminate just unfair competition, but was intended to eliminate all competition from Newman. As we said in Chambers-Dobson, Inc. v. Squier, 238 Neb. 748, 472 N.W.2d 391 (1991), a covenant may protect against competition by improper and unfair methods, but an employer is not entitled to enforce a covenant which merely protects against ordinary competition.
The agreement also contains the following paragraph:
In the event that any portion of this Covenant may be held to be invalid or unenforceable for any reason, it is agreed that said invalidity or unenforceability shall not affect the other portions of this Covenant, and that the remaining covenants, terms and conditions or portions thereof shall remain in full force and effect and any court of competent jurisdiction may so modify the objectionable provision as to make it valid, reasonable and enforceable.
In the years following the stock sale agreement, Newman was unable to find employment in the railroad industry. In July 1991, he began purchasing equipment for the purpose of opening a shop which would brush plate railroad axles. He also divulged Vanguard's trade secrets to three individuals and contacted Vanguard's customers in an attempt to solicit business.
Vanguard filed a suit in the district court for Lancaster County seeking to enjoin Newman from violating the terms of the agreement. The trial court found that the covenant not to divulge information was reasonable as written. The trial court then found that the covenant not to compete was unreasonable as written and reformed the agreement so that it would be enforceable. In reforming the agreement, the trial court struck from the covenant the words "or anywhere else on earth, or such lesser period of time or geographical area restriction as a court of law might later determine to be the limits of enforceability of this covenant." The court enjoined Newman from violating the reformed covenant.
Newman appeals from the ruling and asserts that the trial court erred (1) in reforming the covenant not to compete, (2) in enforcing the reformed covenant, and (3) in failing to find that the covenants constitute an unreasonable restraint of trade.
An action for injunction sounds in equity. County of Dakota v. Worldwide Truck Parts & Metals, 245 Neb. 196, 511 N.W.2d 769 (1994); Village of Brady v. Melcher, 243 Neb. 728, 502 N.W.2d 458 (1993). Reformation of a contract is also an equity action. Ames v. George Victor Corp., 228 Neb. 675, 424 N.W.2d 106 (1988). In an appeal of an equity action, an appellate court tries factual questions de novo on the record *655 and reaches a conclusion independent of the findings of the trial court, provided, where credible evidence is in conflict on a material issue of fact, the appellate court considers and may give weight to the fact that the trial judge heard and observed the witnesses and accepted one version of the facts rather than another. Whitehead Oil Co. v. City of Lincoln, 245 Neb. 660, 515 N.W.2d 390 (1994); County of Dakota v. Worldwide Truck Parts & Metals, supra.
This court has never allowed reformation of a covenant not to compete. Previous cases have implied that, under certain circumstances, reformation would be allowed. For example, in Polly v. Ray D. Hilderman & Co., 225 Neb. 662, 669, 407 N.W.2d 751, 756-57 (1987), we stated:
In previous cases of this nature we have declined, for various reasons, to rewrite the covenant so as to make it "no greater than necessary." [Citations omitted.] We once again do not believe that this is a proper case for reformation of the covenant not to compete.... [The party seeking to reform the covenant] did not request reformation in its answer and cross-petition and did not argue that issue either at the trial court level or on appeal.
See, also, Philip G. Johnson & Co. v. Salmen, 211 Neb. 123, 317 N.W.2d 900 (1982).
Vanguard argues that reformation should be allowed in this case for three reasons. First, Vanguard notes that the agreement was formed in conjunction with the sale of a business interest, rather than with an employment contract. "[C]ourts have generally been more willing to uphold promises to refrain from competition made in connection with sales of good will than those made in connection with contracts of employment." Restatement (Second) of Contracts § 188, comment b. at 42 (1981). Second, Vanguard notes that both parties to the agreement were represented by counsel and therefore had equal bargaining power. Vanguard's final argument, upon which the trial court relied, raises a question of first impression in this jurisdictionwhether parties can agree to allow a court to reform an unreasonable covenant. The courts that have addressed this question have not reached uniform results. See, generally, Annot., 61 A.L.R.3d 397 (1975).
Vanguard cites several decisions from other courts which reflect the recent trend to allow the modification of covenants not to compete regardless of whether the parties have agreed to such modification. The courts which have allowed the modification have either allowed modification by "blue penciling" or by the "rule of reasonableness." The "blue pencil" rule, which was followed by the trial court, allows a court to strike an unreasonable restriction from a covenant if, after its removal, the covenant remains grammatically meaningful. E.g. Solari Industries, Inc. v. Malady, 55 N.J. 571, 264 A.2d 53 (1970).
Most courts which have recently addressed the question have granted modification by the rule of reasonableness, which allows the court to fashion an agreement which reasonably protects the interests of the party seeking to enforce the covenant. E.g., Data Management, Inc. v. Greene, 757 P.2d 62 (Alaska 1988); Central Adjustment Bureau, Inc. v. Ingram, 678 S.W.2d 28 (Tenn.1984); Ehlers v. Iowa Warehouse Company, 188 N.W.2d 368 (Iowa 1971), modified 190 N.W.2d 413. In a case which was factually similar to this case, the Supreme Court of Tennessee held that judicial modification of an unreasonable covenant not to compete was justified, especially where the parties had agreed to such modification. Central Adjustment Bureau, Inc. v. Ingram, supra.
A minority of the courts which have addressed the question have held that courts may not revise an agreement so as to make it enforceable. These courts have reasoned that reformation is tantamount to the construction of a private agreement and that the construction of private agreements is not within the power of the courts. See, Rollins Protective Svcs. Co. v. Palermo, 249 Ga. 138, 287 S.E.2d 546 (1982); Rector-Phillips-Morse v. Vroman, 253 Ark. 750, 489 S.W.2d 1 (1973).
We find the minority view the most reasonable view and the view which is most in harmony with existing precedent. In Vlasin *656 v. Len Johnson & Co., 235 Neb. 450, 455, 455 N.W.2d 772, 776 (1990), we stated that "[i]t is not the function of the courts to reform unreasonable covenants not to compete solely for the purpose of making them legally enforceable." The provision of the agreement which states that a court may reform the covenant is of no effect. Private parties may not confer upon the court powers which it does not possess. Rector-Phillips-Morse v. Vroman, supra. This court has stated repeatedly that courts may not rewrite a contract for parties. Metropolitan Life Ins. Co. v. Beaty, 242 Neb. 169, 493 N.W.2d 627 (1993); Husen v. Husen, 241 Neb. 10, 487 N.W.2d 269 (1992).
Because we find that the covenant is not subject to modification, we must either enforce it as written or not enforce it at all. The trial court found as a matter of law that the covenant not to compete was unenforceable as written. That finding was not challenged, and we let it stand.
Accordingly, we reverse the judgment of the trial court and remand the cause, directing the trial court to enter an order consistent with this opinion.
REVERSED AND REMANDED WITH DIRECTION.
