chapter-3 struct changed