
168 Cal.App.2d 142 (1959)
ROYAL LEONARD, Plaintiff and Appellant,
v.
MICHAEL J. HERMRECK et al., Defendants and Appellants.
Civ. No. 5789. 
California Court of Appeals. Fourth Dist.  
Feb. 20, 1959.
 Fred W. Chase for Plaintiff and Appellant.
 A. W. Swarner for Defendants and Appellants.
 STONE, J. pro tem.  [fn. *]
 The defendants were awarded a contract to construct a section of state highway known as the Colton Freeway Project. Subsequently, they entered into a subcontract dated November 21, 1955, with the plaintiff who agreed to haul approximately 220,000 tons of dirt from the Portland Cement pit to the roadbed of the freeway between certain designated stations. The contract rate to be paid plaintiff was 7 1/2 cents per ton. By the terms of the subcontract plaintiff agreed to furnish trucks and drivers while the defendants agreed to furnish loaders. The agreement was modified by a written instrument dated November 30, 1955, whereby plaintiff agreed to furnish the loader and defendants agreed to increase the price per ton from 7 1/2 cents to 11 cents for all dirt hauled. The plaintiff had no contractor's license at the time he executed the contracts nor while he was performing work pursuant to the contracts. For reasons which are not *144 material to the issues before us the plaintiff ceased work before the contract was completely performed. He commenced an action against the defendants based upon two causes of action. The first was in the nature of a common count for the value of services rendered to defendants, and the second was for damages by reason of defendants' alleged wrongful detention and use of plaintiff's loader. At the conclusion of plaintiff's case the defendants made a motion for nonsuit upon the ground that plaintiff had no contractor's license. The motion was granted, a judgment was entered pursuant thereto, and the plaintiff appeals from that judgment.
 At the time the court granted the motion for nonsuit plaintiff moved for a dismissal of defendant's counterclaim. The court, remarking that the parties were in pari delicto, granted the motion. The defendants appeal from the judgment dismissing their counterclaims.
 Business and Professions Code, section 7028, makes it unlawful for any person to act in the capacity of a contractor within this state without a license therefor. Section 7031 of the same code provides as a civil penalty a bar to maintaining an action if a license is required. Section 7031 provides:
 "No person engaged in the business or acting in the capacity of a contractor, may bring or maintain any action in any court of this State for the collection of compensation for the performance of any act or contract for which a license is required by this chapter without alleging and proving that he was a duly licensed contractor at all times during the performance of such act or contract."
 [1] Therefore if plaintiff was acting as a contractor and without a license the motion for nonsuit was properly granted as to the first cause of action. The term "contractor" is defined in Business and Professions Code, section 7026, as "any person, who undertakes to or offers to undertake to or purports to have the capacity to undertake to or submits a bid to, or does himself or by or through others, construct, alter, repair, add to, subtract from, improve, move, wreck or demolish any building, highway, road, railroad, excavation or other structure, project, development or improvement, or to do any part thereof, including the erection of scaffolding or other structures or works in connection therewith. The term contractor includes subcontractor and specialty contractor."
 The plaintiff furnished a loader and trucks with drivers which took dirt from a "pit" and hauled it to designated places on the highway roadbed where it was dumped. Plaintiff *145 contends that he did not come within the provisions of section 7026 because he did nothing except deposit dirt on the roadbed, and that the grading, tamping and other work was performed by defendants and at defendants' direction. However, plaintiff did "subtract from the pit" and he "added to and improved" the highway, which brought his work within the provisions of the section. Furthermore, the contract between the parties in which defendants are designated as general contractors and plaintiff as subcontractor provides that:
 "The Subcontractor agrees to complete the above work in a workmanlike manner ready for use and in good operating condition, in accordance with the general conditions, special provisions, specifications and drawings for the aforesaid Project, all as prepared by the Owner, and for which Project public bids were received by the Owner ...; it is further agreed that the aforesaid general conditions, special provisions, specifications and drawings now become a part of This Subcontract with which the Subcontractor agrees to comply."
 Clearly, by agreeing to comply with the engineering plans and drawings for the construction of the freeway plaintiff became more than a mere conveyor of dirt (Lewis & Queen v. N. M. Ball Sons, 48 Cal.2d 141, 150 [308 P.2d 713].) The motion for nonsuit was properly granted as to the first cause of action.
 The second cause of action is based upon conversion of plaintiff's loader. It is alleged that when the plaintiff ceased work on the project on January 26, 1956, the defendants wrongfully took his loader and refused to deliver possession of it to him until July 1, 1956. The complaint also alleges that plaintiff not only suffered loss of use but that the equipment was damaged by the defendants. These alleged wrongful acts of defendants occurred after the relationship created by the contract had terminated. Reviewing the record insofar as it relates to the second cause of action, disregarding the conflicts in the evidence and indulging in every legitimate inference favorable to the plaintiff, we find substantial evidence to support the allegations of the complaint. (Perera v. Panama-Pacific Intl. Exp. Co., 179 Cal. 63, 64 [175 P. 454]; Downey v. Santa Fe Transportation Co., 134 Cal.App.2d 720, 728 [286 P.2d 40].)
 [2] The second cause of action is not founded upon an illegal contract and therefore is not barred by section 7031 of the Business and Professions Code. Defendants argue that *146 the transaction to which the second cause of action pertains is tainted with illegality because it emanated from a relationship which was illegal in its inception. There is evidence in the record indicating that the relationship had terminated when defendants commenced using plaintiff's equipment for their own purposes. The fact that there had been a relationship founded upon an illegal contract did not, upon termination of the relationship, give the defendants the right to appropriate property belonging to the other party to the contract. Defendants' conversion of plaintiff's property was wrongful insofar as the pleadings are concerned, and the evidence, when viewed in the light of a motion for a nonsuit, supports the pleadings sufficiently to justify completely trying the issue.
 [3] The defendants have appealed from judgment of dismissal of their counterclaims. The dismissal was entered by the court upon motion of plaintiff upon the ground the contract being illegal the parties were in pari delicto and neither could recover. As pointed out hereinbefore, the second cause of action does not stem from the illegal contract but upon alleged actions of defendants after the contract was abandoned. The defendants presented no evidence in support of their counterclaims because the motion for nonsuit was granted. It is impossible to determine from the record whether the counterclaims relate solely to matters arising pursuant to the illegal contract or whether they relate in some degree to matters occurring subsequent to the termination of the contract. Therefore, the counterclaims must be litigated and a factual determination made in the trial court.
 The judgment of nonsuit of plaintiff's first cause of action is affirmed. The judgment of nonsuit of plaintiff's second cause of action is reversed. The judgment of dismissal of defendants' counterclaims is reversed.
 Mussell, Acting P. J., and Shepard, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
