add code samples for ch03 to ch19