completed ch5 exercise 3 and 4