chapter 2; exercise 6 - init