starting to convert chapter 23 examples to swift