chapter 2; exercise 3 - setHead