Fixes
Update code to match book
Update to match book