1 EXHIBIT 10.4 STOCK PLEDGE AGREEMENT THIS STOCK PLEDGE AGREEMENT (the "Agreement") is made and entered into as of this 18th day of October 1999 by and between OAKHURST TECHNOLOGY, INC. (the "Pledgor") and ROBERT DAVIES (the "Secured Party"). W I T N E S S E T H: WHEREAS, the Pledgor has received loans from the Secured Party in the aggregate principal amount of $539,117 evidenced by a Promissory Note, dated as of the date hereof (together with all amendments and other modifications, if any, from time to time thereafter made thereto, the "Promissory Note"), between the Pledgor and the Secured Party; and WHEREAS, the Pledgor has pledged and granted to the Secured Party effective as of the date hereof a security interest in that certain common stock, par value $0.01 per share ("Common Stock"), of Sterling Construction Company (the "Company") as identified on Schedule I hereto (together with all other shares of capital stock of the Company required to be pledged hereunder, the "Pledged Stock"); and WHEREAS, in order to secure the payment of its obligations under the Promissory Note and to evidence the security interest hereby granted, the Pledgor is executing and delivering this Agreement; and WHEREAS, the Pledgor has duly authorized the execution, delivery and performance of this Agreement; NOW, THEREFORE, in consideration of the premises and the mutual covenants contained herein, the parties hereto agree as follows: 1. PLEDGE OF STOCK; OTHER COLLATERAL. (a) As continuing collateral security for the payment and performance when due of all debts, obligations or liabilities now or hereafter existing, absolute or contingent, of the Pledgor to the Secured Party under the Promissory Note and obligations of the Pledgor now or hereafter existing under this Agreement (collectively, the "Obligations"), and subject to Section 8 hereof, the Pledgor hereby pledges, mortgages, charges and collaterally assigns to the Secured Party, and grants to the Secured Party pursuant to the Delaware Uniform Commercial Code (the "UCC") a first priority security interest in, the Pledged Stock and all of the following: (i) all shares of Common Stock when and if released from escrow to the Pledgor in accordance with the 2 terms of the Stock Purchase and Investment Agreement dated as of January 19, 1999 (as amended from time to time, the "Purchase Agreement") by and between the purchasers listed on Exhibit A thereto, on the one hand, and the Company, Texas-Sterling Construction, Inc. and the stockholders listed on Exhibit A thereto, on the other hand, and any and all amendments thereto; (ii) all cash, securities, dividends, rights, and other property at any time and from time to time issued, allotted, declared or distributed in respect of or in exchange for any or all of the Pledged Stock; and (iii) all other property hereafter delivered to the Secured Party in substitution for or in addition to any of the foregoing, all certificates and instruments representing or evidencing such property and all cash, securities, interest, dividends, rights, and other property at any time and from time to time declared or distributed in respect of or in exchange for any or all of the Pledged Stock. All such Pledged Stock, certificates, instruments, cash, securities, interest, dividends, rights and other property referred to in this Section 1 are herein collectively referred to as the "Collateral." All of the Pledged Stock is currently owned by the Pledgor and represented by the stock certificates listed on Schedule I hereto, which stock certificates are being delivered to the Secured Party simultaneously herewith. (b) The Pledgor agrees to deliver all the Collateral to the Secured Party at such location as the Secured Party shall from time to time designate by written notice pursuant to Section 16 hereof for its custody at all times until termination of this Agreement, together with such instruments of assignment and transfer as requested by the Secured Party. 2. STATUS OF PLEDGED STOCK. The Pledgor hereby represents and warrants to the Secured Party that (i) all of the shares of Pledged Stock are duly authorized, validly issued and outstanding, fully paid and nonassessable, (ii) the Pledgor is the registered and record and beneficial owner of the Pledged Stock, free and clear of all liens, charges, equities, encumbrances and restrictions on pledge or transfer (other than the pledge hereunder and applicable restrictions pursuant to federal and state securities laws), and (iii) the pledge, assignment and delivery of the Pledged Stock to the Secured Party pursuant to this Agreement creates a valid and perfected first priority security interest in the Pledged Stock, securing the payment of the Obligations. Except as provided in Section 4 or Section 5 hereof, none of the Pledged Stock (nor any interest therein or thereto) shall be sold, transferred or assigned without the Secured Party's prior written consent. The Pledgor covenants with the Secured Party that it shall at all times cause the Pledged Stock to be represented by the certificates now and hereafter delivered to the Secured Party in -2- 3 accordance with Section 1 hereof or by certificates registered in the name of the Secured Party, as pledgee, or in the name of the Pledgor. 3. PRESERVATION AND PROTECTION OF COLLATERAL. (a) The Secured Party shall be under no duty or liability with respect to the collection, protection or preservation of the Collateral, or otherwise, beyond accounting for Collateral delivered to it and any proceeds from the sale thereof and the use of reasonable care in the custody and preservation thereof while in its possession. (b) The Pledgor agrees to pay when due all taxes, charges, Liens and assessments against the Collateral, unless being contested in good faith by appropriate proceedings diligently conducted and against which adequate reserves have been established in accordance with generally accepted accounting principles. 4. DEFAULT. Should the Pledgor fail to pay the Secured Party any Obligations as of the end of the business day on which such Obligations become due and payable and after the expiration of all grace or cure periods, if any, and all extensions or waivers, if any, and should such failure continue, or should the Pledgor register or permit any registration to be made for the transfer of any of the Pledged Stock to any Person other than as expressly permitted by this Agreement, or should any other default set forth in the Promissory Note occur and be continuing, or should the Pledgor fail otherwise to comply with the terms hereof (any of the foregoing an "Event of Default"), the Secured Party is given full power and authority, then or at any time thereafter, to sell, assign and deliver or collect the whole or any part of the Collateral, or any substitute therefor or any addition thereto, in one or more sales in such order as the Secured Party may elect; and any such sale may be made either at public or private sale at the Secured Party's place of business or elsewhere, either for cash or upon credit or for future delivery, at such price as the Secured Party may reasonably deem fair; and, to the extent permitted by law, the Secured Party may be the purchaser of any or all Collateral so sold and hold the same thereafter in its own right free from any claim of the Pledgor or right of redemption. Any sale hereunder may be conducted by an auctioneer or any officer of the Secured Party. The Pledgor recognizes that the Secured Party may be unable to effect a public sale of the Collateral by reason of certain prohibitions contained in the Securities Act of 1933, as amended (the "Securities Act"), and applicable state law, and may be otherwise delayed or adversely affected in effecting any sale by reason of present or future restrictions thereon imposed by governmental authorities, and that as a consequence of such prohibitions and restrictions the Secured Party may be compelled (i) to resort to one or more private sales to a restricted group of purchasers who will be obliged to agree, among other things, to acquire the stock for their own account, for investment and not with a view to the distribution or resale thereof, or (ii) to seek -3- 4 regulatory approval of any proposed sale or sales, or (iii) to limit the amount of Collateral sold to any person or group. The Pledgor agrees and acknowledges that private sales so made may be at prices and upon terms less favorable to the Pledgor than if such Collateral was sold either at public sales or at private sales not subject to other regulatory restrictions, and that the Secured Party has no obligation to delay the sale of any of the Collateral for the period of time necessary to permit the issuer of such Collateral to register or otherwise qualify them, even if such issuer would agree to register or otherwise qualify such Collateral for public sale under the Securities Act or applicable state law. The Pledgor further agrees, to the extent permitted by applicable law, that the use of private sales made under the foregoing circumstances to dispose of the Collateral shall be deemed to be dispositions in a commercially reasonable manner. In addition to the foregoing, the Secured Party may exercise such other rights and remedies as may be available under the Promissory Note, at law (including, without limitation, the UCC) or in equity. 5. PROCEEDS OF SALE. The proceeds of the sale of any of the Collateral by the Pledgor (which sale must be for fair market value) or the Secured Party and all sums received or collected from or on account of such Collateral shall be applied to repay the Obligations and only after such application need the Secured Party account for the surplus, if any, to the Pledgor. 6. ATTORNEY-IN-FACT. The Pledgor hereby appoints the Secured Party as the Pledgor's attorney-in-fact for the purposes of carrying out the provisions of this Agreement and taking any action and executing any instrument which the Secured Party may deem necessary or advisable to accomplish the purposes hereof, which appointment is irrevocable and coupled with an interest; provided, that the Secured Party shall have and may exercise rights under this power of attorney only upon the occurrence and during the continuance of an Event of Default. Without limiting the generality of the foregoing, upon the occurrence and during the continuance of an Event of Default, the Secured Party shall have the right and power to receive, endorse and collect all checks and other orders for the payment of money made payable to the Pledgor representing any dividend, interest payment, principal payment or other distribution payable or distributable in respect to the Collateral or any part thereof and to give full discharge for the same. 7. DIVIDENDS AND VOTING RIGHTS. (a) So long as no Event of Default shall have occurred and be continuing, (i) all dividends and other distributions with respect to the Pledged Stock shall be paid directly to the Pledgor and (ii) the registration of the Collateral in the name of the Pledgor shall not be changed and the Pledgor shall be entitled to exercise all voting and other rights and powers pertaining to the Collateral for all purposes not inconsistent with the terms hereof. -4- 5 (b) Upon the occurrence and during the continuance of any Event of Default, at the option of the Secured Party, (i) all dividends and other distributions with respect to the Pledged Stock shall be paid directly to the Secured Party and shall be applied to repay the Obligations and (ii) all rights of the Pledgor to exercise the voting or consensual rights and powers which it is authorized to exercise pursuant to subsection (a) above shall cease and the Secured Party may thereupon (but shall not be obligated to), at its request, cause such Collateral to be registered in the name of the Secured Party or its nominee and/or exercise such voting or consensual rights and powers as appertain to ownership of such Collateral, and to that end the Pledgor hereby appoints the Secured Party as its proxy, with full power of substitution, to vote and exercise all other rights as a shareholder with respect to the Pledged Stock hereunder upon the occurrence and during the continuance of any Event of Default, which proxy is coupled with an interest and is irrevocable prior to termination of this Agreement, and the Pledgor hereby agrees to provide such further proxies as the Secured Party may reasonably request. 8. OTHER RIGHTS. The rights, powers and remedies given to the Secured Party by this Agreement shall be in addition to all rights, powers and remedies given to the Secured Party by virtue of any statute or rule of law. Any forbearance or failure or delay by the Secured Party in exercising any right, power or remedy hereunder shall not be deemed to be a waiver of such right, power or remedy, and any single or partial exercise of any right, power or remedy hereunder shall not preclude the further exercise thereof; and every right, power and remedy of the Secured Party shall continue in full force and effect until such right, power or remedy is specifically waived by the Secured Party by an instrument in writing. 9. FURTHER ASSURANCES. The Pledgor agrees to do such further acts and things, and to execute and deliver such additional conveyances, assignments, financing statements, agreements and instruments, as the Secured Party may at any time reasonably request in connection with the administration or enforcement of this Agreement or related to the Collateral or any part thereof or in order better to assure and confirm unto the Secured Party its rights, powers and remedies. The Pledgor hereby consents and agrees that the issuers of or obligors in respect of the Collateral shall be entitled to accept the provisions hereof as conclusive evidence of the right of the Secured Party to exercise its rights hereunder with respect to the Collateral, notwithstanding any other notice or direction to the contrary heretofore or hereafter given by the Pledgor or any other Person to any of such issuers or obligors. 10. BINDING AGREEMENT; ASSIGNMENT. This Agreement, and the terms, covenants and conditions hereof, shall be binding upon and inure to the benefit of the parties hereto, and to their respective successors and assigns. All references herein to the Secured Party -5- 6 shall include any successor thereof and any other obligees from time to time of the Obligations. 11. SEVERABILITY. In case any lien, security interest or other right of the Secured Party or any provision hereof shall be held to be invalid, illegal or unenforceable, such invalidity, illegality or unenforceability shall not affect any other lien, security interest or other right granted hereby or provision hereof. 12. COUNTERPARTS. This Agreement may be executed in any number of counterparts and all the counterparts taken together shall be deemed to constitute one and the same instrument. 13. TERMINATION. This Agreement and all obligations of the Pledgor hereunder shall terminate without delivery of any instrument or performance of any act by any party on the date when all of the Obligations have been fully paid and the Promissory Note terminated. Upon such termination of this Agreement, the Secured Party shall deliver to the Pledgor the certificates evidencing the Pledged Stock (and any other property received as a dividend or distribution or otherwise in respect of the Pledged Stock), together with any cash then constituting the Collateral, not then sold or otherwise disposed of in accordance with the provisions hereof and take such further actions as may be necessary to effect the same. 14. NOTICES. Any notice shall be conclusively deemed to have been received by any party hereto and be effective on the day on which delivered to such party (against receipt therefor) at the address set forth below or such other address as such party shall specify to the other parties in writing (or, in the case of telephonic notice or notice by telecopy (where the receipt of such message is verified by return) expressly provided for hereunder, when received at such telephone or telecopy number as may from time to time be specified in written notice to the other parties hereto or otherwise received), or if sent prepaid by certified or registered mail return receipt requested on the third Business Day after the day on which mailed, or if sent prepaid by a national overnight courier service, on the first Business Day after the day on which delivered to such service against receipt therefor, addressed to such party at said address: (a) if to the Pledgor: Oakhurst Technology, Inc. 3365 Spruce Lane Grapevine, Texas 76051 Telephone: (817) 416-0717 Telecopy: (817) 416-0914 -6- 7 (b) if to the Secured Party: Robert Davies 100 First Stamford Place Suite 600 Stamford, Connecticut 06902 Telephone: (203) 325-8935 Telecopy: (203) 325-8948 15. GOVERNING LAW; WAIVERS OF TRIAL BY JURY, ETC. (a) THIS AGREEMENT SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF DELAWARE APPLICABLE TO CONTRACTS EXECUTED, AND TO BE FULLY PERFORMED, IN SUCH STATE. (b) EACH PARTY HEREBY EXPRESSLY AND IRREVOCABLY AGREES AND CONSENTS THAT ANY SUIT, ACTION OR PROCEEDING ARISING OUT OF OR RELATING TO THIS AGREEMENT AND THE TRANSACTIONS CONTEMPLATED HEREIN MAY BE INSTITUTED IN ANY STATE OR FEDERAL COURT SITTING IN THE STATE OF DELAWARE, UNITED STATES OF AMERICA AND, BY THE EXECUTION AND DELIVERY OF THIS AGREEMENT, EXPRESSLY WAIVES ANY OBJECTION THAT IT MAY HAVE NOW OR HEREAFTER TO THE LAYING OF THE VENUE OR TO THE JURISDICTION OF ANY SUCH SUIT, ACTION OR PROCEEDING, AND IRREVOCABLY SUBMITS GENERALLY AND UNCONDITIONALLY TO THE JURISDICTION OF ANY SUCH COURT IN ANY SUCH SUIT, ACTION OR PROCEEDING. (c) IN ANY ACTION OR PROCEEDING TO ENFORCE OR DEFEND ANY RIGHTS OR REMEDIES UNDER OR RELATED TO THIS AGREEMENT OR ANY AMENDMENT, INSTRUMENT, DOCUMENT OR AGREEMENT DELIVERED OR THAT MAY IN THE FUTURE BE DELIVERED IN CONNECTION WITH THE FOREGOING, EACH PARTY HEREBY AGREES, TO THE EXTENT PERMITTED BY APPLICABLE LAW, THAT ANY SUCH ACTION OR PROCEEDING SHALL BE TRIED BEFORE A COURT AND NOT BEFORE A JURY AND EACH PARTY HEREBY WAIVES, TO THE EXTENT PERMITTED BY APPLICABLE LAW, ANY OBJECTION THAT IT MAY HAVE THAT EACH ACTION OR PROCEEDING HAS BEEN BROUGHT IN AN INCONVENIENT FORUM. [SIGNATURE PAGE FOLLOWS.] -7- 8 IN WITNESS WHEREOF, the parties have duly executed this Agreement on the day and year first written above. OAKHURST TECHNOLOGY, INC. By: /s/ Maarten D. Hemsley ---------------------------------- Name: Maarten D. Hemsley Title: President ROBERT DAVIES /s/ Robert M. Davies ------------------------------------- -8- 9 SCHEDULE I No. of Certificate Shares No. for Name of Company Class of Stock Pledged Pledged Shares - --------------- -------------- ------- --------------- Sterling Construction Common Stock 17,524 Company -9-