week7 sample code