add switch example - chapter 5