working on hw5 exercise 4.