Chapter 3 without loops