Finished solution to Question#2