chapter 1 update, for generic type