Completed exercise 4 of X.6