Exhibit 10.4 AMENDMENT NO. 1 TO THE RESTRICTED STOCK EXCHANGE AGREEMENT BETWEEN CALENERGY COMPANY, INC. (formerly known as "CALIFORNIA ENERGY COMPANY, INC.") AND DAVID L. SOKOL This Amendment No. 1 (the "Amendment") to the Restricted Stock Exchange Agreement dated November 29, 1995 (the "Restricted Stock Agreement") between CalEnergy Company, Inc., a Delaware corporateion (the "Company), and David L. Sokol (the "Recipient"), is entered into as of August 28, 1996. WHEREAS, the Company and the Recipient are presently parties to the Restricted Stock Agreement; and WHEREAS, the Company and the Recipient desire to amend the Restricted Stock Agreement as set forth herein; NOW, THEREFORE, the Company and the Recipient hereby agree as follows: (1) Vesting of Certain Shares. Section 3(b) of the Restricted Stock Agreement notwithstanding, an an aggregate of 25,000 shares of Stock (as defined in the Restricted Stock Agreement) which otherwise would have vested in installments of 6,250 shares on the last day of each of August, September, October and November of the year 2000, shall instead vest on the date hereof. (2) No Other Changes. Except as provided herein and to the extent necessary to give full effect to the provisions of this Amendment, the terms of the Restricted Stock Agreement shall remain in full force and effect. IN WITNESS WHEREOF, the parties hereto have entered into this Amendment effective as of August 28, 1996. CALENERGY COMPANY, INC. By: s/s Steven A. McArthur Name: Steven A. McArthur Title: Senior Vice President RECIPIENT s/s David L.Sokol David L. Sokol AMENDMENT NO. 2 TO THE RESTRICTED STOCK EXCHANGE AGREEMENT BETWEEN CALENERGY COMPANY, INC. AND DAVID L. SOKOL This Amendment No. 2 (the "Amendment") to the Restricted Stock Exchange Agreement dated November 29, 1995, as amended on August 28, 1996 (the "Agreement") by and between CalEnergy Company, Inc., a Delaware corporation (the "Company), and David L. Sokol (the "Recipient"), is entered into as of April 16, 1997. WHEREAS, the Company and the Recipient are presently parties to the Agreement; and WHEREAS, the Company and the Recipient desire to amend the Agreement as set forth herein; NOW, THEREFORE, the Agreement is hereby amended as follows: Company and the Recipient hereby agree as follows: (3) Section 3(b) of the Agreement notwithstanding, all the remaining shares of Common Stock covered by the Agreement which have not yet vested shall vest as of the date of this Amendment, except for 75,000 shares, which shall all vest on January 1, 1998, subject to earlier vesting as provided in the Agreement. Except as provided herein and to the extent necessary to give full effect to the provisions of this Amendment, the terms of the Restricted Stock Exchange Agreement shall remain in full force and effect. IN WITNESS WHEREOF, the parties hereto have entered into this Amendment effective as of April 16, 1997. CALENERGY COMPANY, INC. By: s/s Steven A. McArthur Name: Steven A. McArthur Title: Senior Vice President RECIPIENT s/s David L. Sokol David L. Sokol