
444 S.W.2d 853 (1969)
Ross McELREATH, Appellant,
v.
Henry C. RIQUELMY et al., Appellee.
No. 270.
Court of Civil Appeals of Texas, Houston (14th Dist.).
September 10, 1969.
Hugh E. McGee, Jr., Houston, for appellant.
William G. Wilson, Thad T. Hutcheson, Hutcheson, Taliaferro & Grundy, Houston, for appellee.
*854 TUNKS, Chief Justice.
On July 1, 1960, Henry C. Riquelmy, Ross McElreath, Ray W. Lacour and Robert H. Isaacs entered into a partnership agreement to engage in the accounting profession under the firm name of Mattison and Riquelmy. After provisions as to the partners' ownership in the assets of the firm and participation in its income the contract provided as follows:
"6. This agreement may be cancelled by any party hereto upon 30 days written notice to the other parties, in which event the earnings of Mattison and Riquelmy will be determined on the accrual basis as of the end of the month in which the notice is given in order to determine the earnings subject to this agreement. This amount due the withdrawing partner plus his capital account will be paid by Mattison and Riquelmy or Henry C. Riquelmy at a rate to be determined but in not less than 3 years.
"7. Any partner withdrawing from the partnership of Mattison and Riquelmy agrees not to enter into competition for a period of 3 years with Mattison and Riquelmy and agrees not to solicit any of its clients or accept work from any of its clients without first notifying Henry C. Riquelmy. And any such withdrawing partner who accepts work over the objection of Henry C. Riquelmy shall forfeit any amount due him under paragraph 6, above."
On November 17, 1964, Ross McElreath gave the other members of the partnership the following written notice:
"Gentlemen:
"In accordance with the terms of our partnership agreement I hereby give the required thirty day notice of my intention to withdraw from or cancel said agreement."
On December 9, 1964, McElreath wrote to Henry C. Riquelmy as follows:
"Dear Mr. Riquelmy:
"In accordance with the terms of our partnership agreement effective July 1, 1960 and terminating December 16, 1964; I, the withdrawing partner, hereby give you notice as required in paragraph 7 of said agreement of my intention to practice public accountancy in competition with Mattison and Riquelmy and accept work from any of its clients who so request. Solicitation is a violation of the Code of professional ethics; I will not solicit."
On January 12, 1965, Riquelmy wrote the following letter to McElreath:
"Dear Mr. McElreath:
"In accordance with the partnership agreement of Mattison and Riquelmy dated July 1, 1960, you are hereby informed that the writer objects your soliciting work from clients of Mattison and Riquelmy, and also objects to your accepting work from clients of Mattison and Riquelmy, and you are hereby notified to decline said work in writing with copy to this firm. If you comply with this objection then the earnings accrued as of November 30, 1964, and your partnership capital account will be paid to you on December 16, 1967. Should you fail to comply with the objection mentioned above by February 15, 1965, then you are hereby notified that you will forfeit the earnings to which you may be entitled on the accrual basis as well as your capital account."
Despite the fact that Riquelmy objected to his doing so, McElreath accepted work from clients of the partnership whose accounts he had handled while he was a member of the firm. Those clients were located at Houston, Harris County, Texas, and the work from them was accepted within 90 days from the time of his withdrawal from the partnership. For such reason the remaining partners refused to account to him for the amount to which he would *855 otherwise be entitled under the terms of paragraph 6 of the contract. McElreath filed suit against the remaining partners for such accounting and for judgment for the amount to be found due him under such accounting. The defendants filed motion for summary judgment supported by affidavits establishing the above recited facts. The trial court granted the defendants' motion for summary judgment and the plaintiff, McElreath, has appealed.
Appellant's first point of error is to the effect that the trial court erred in granting the motion for summary judgment because there was a question of fact as to the reasonableness of the restrictive covenant contained in paragraph 7 of the contract. That point is overruled. The question as to such reasonableness was properly determined by the court as a question of law. Chenault v. Otis Engineering Corp., 423 S.W.2d 377, ref., n. r. e.
By his second point of error the appellant contends that the provisions of paragraph 7 restricting his competition with the partnership are "illegal and void." That point is overruled. Even though the language of paragraph 7 of the contract be construed as an agreement restricting competition without limitation as to area it was, nevertheless, not illegal or void. Weatherford Oil Tool Co. v. Campbell, 161 Tex. 310, 340 S.W.2d 950.
By his third point of error the appellant suggests that the non-competition agreement contained in paragraph 7 of the contract is ambiguous because it does not clearly state whether the three year period during which competition is prohibited begins at the date of the execution of the contract or at the date of the withdrawal of a partner. That point, too, is overruled. A construction to the effect that the three year period began at the date of the execution of the contract would be wholly unreasonable. The correspondence between the parties, set forth above, clearly shows that they understood the restrictive period to begin at the date of the withdrawal of the partner. If there were any ambiguity in the language used in the contract, the question as to its meaning was resolved by the parties' own construction of it. James Stewart & Co. v. Law, 149 Tex. 392, 233 S.W.2d 558, 22 A.L.R.2d 639.
The real controversy between the parties relates to the construction of and the effect of the language of paragraph 7 of their partnership agreement. It is the contention of the appellant that such paragraph contains an agreement not to compete for a period of three years which is unlimited as to area, so that it is unenforcible to the extent that its breach does not give rise to a defense to his claim for an accounting under the terms of paragraph 6. In support of his contention the appellant cites Weatherford Oil Tool Co. v. Campbell, supra, wherein it was held that the breach of such a non-competition agreement unlimited as to area would not give rise to a cause of action for damages. From the holding of that case the appellant argues, with some reason, that a breach of such an agreement will not give rise to a defense of action on the contract.
We do not agree with appellant as to his construction of the language of paragraph 7 of the contract. It is true that the first part of the first sentence of that paragraph contains a general recitation to the effect that the appellant will not compete with his former partners for a period of three years and makes no reference to any geographical limitation as to area. However, we do not consider it proper to lift that language out of the contract and to construe it without reference to the other language of the contract, particularly the other language of paragraph 7. In construing a contract between the parties all parts of the contract are to be taken together and such meaning shall be given to them as will carry out the intention of the parties. City of Pinehurst v. Spooner Addition Water Co. (Tex.Sup.Ct.), 432 S.W.2d 515. In the application of such rule we find it necessary to give consideration to the other language contained in paragraph 7 in determining what the parties *856 intended to be their real agreement as to non-competition by the withdrawing partner. The other language of paragraph 7 contemplates that such withdrawing partner may engage in competition to the extent of rendering services for the clients of the partnership. That language, however, imposes a penalty on the withdrawing partner for such competition, namely the surrender of his rights to an accounting under paragraph 6 of the contract. When the applicable rules are applied we are of the opinion that paragraph 7 is an agreement to the effect that a withdrawing partner will not engage in competition with the partnership to the extent of rendering services for its clients, provided, however, that if he does engage in such competition, he will surrender his rights to an accounting under paragraph 6. It is to be noted that such language does not constitute an absolute prohibition from engaging in competition but sets out the penalty for engaging in a particular type of competition. (There is authority for the proposition that such an agreement is not one in restraint of trade. See Brown Stove Works, Inc. v. Kimsey, 119 Ga.App. 453, 167 S.E.2d 693). We are of the opinion that such a construction is entirely consistent with the conduct of the parties as indicated by their correspondence set forth above and is a reasonable construction of the intent of the parties, giving consideration to all of the language of the contract.
Thus we have a non-competition agreement which, while it is not limited as to geographical area, is, nevertheless, limited in that it relates to competition by the acceptance of work from the clientele of the partnership. Such a restrictive covenant is reasonably necessary to protect the good will and the going business asset of an existing partnership engaged in the accounting profession. Such holding is consistent with the language and the holdings of Traweek v. Shields, Tex.Civ.App., 380 S.W.2d 131, no writ hist.; Hudson v. International Exterminator Corp., Tex.Civ. App., 256 S.W.2d 123, ref., n. r. e., and Jennings v. Shepherd Laundries Co., Tex. Civ.App., 276 S.W. 726, err. dismd. In Bates Chevrolet Corp. v. Haven Chevrolet, Inc., 13 A.D.2d 27, 213 N.Y.S.2d 577, the New York Appellate Division held such an agreement to be valid and enforcible. In that case the Court said at p. 581, "The covenant here involved was limited in time to five years. Moreover, rather than exclude Betz from competing within a limited geographical area it merely forbade him from soliciting or accepting business from anyone who was or became plaintiff's customer during the period of Betz' employment. As so limited, the covenant did not impose an unreasonable restraint (citing authorities)."
The trial court properly construed the covenant contained within paragraph 7 of the contract between these parties as being valid and enforcible to the extent that McElreath, upon having violated his terms, forfeited his right to an accounting under paragraph 6 thereof.
The judgment of the trial court is affirmed.
