program4 code--