Second solution to Question #3