first draft of solution question 5