chp10 p1 and p2 prog