added a solution to question 17