Question 6 code