Finish ch8 exercise 1