final code week3_1