TETRA TECH, INC. SECOND AMENDMENT TO NOTE PURCHASE AGREEMENT Senior Secured Notes Series A, due May 30, 2011 Series B, due May 30, 2008