EXHIBIT 10.31 STOCK PURCHASE AGREEMENT Dated July 31, 2000