week 10 sample code for exercises