converted chapter 26 example to Swift