finished ch5 exercises