Completed exercise 4 of X9.