Adding solution to Question 1.4