updated ch03 code to match screencast