Added solution to Question 3