chapter 2, controll structures and functions