Added rest of chapter 4 traits code