finished ch8 exercises