working through generics in chapter 5