starting to convert bk 2 ch 4 examples to swift