cleanup of chapter 3 examples