Completing exercise 8-1