NOTE PURCHASE AGREEMENT dated as of July 31, 2001 by and among