Adding solution to Question 1.2