EXHIBIT 10.4 SECOND AMENDED AND RESTATED UNDERTAKING AGREEMENT Dated as of May 23, 2002