Adding answer to question 7