start of ch2 exercise 7
finished ch2 exercise 7