finished converting bk 2 ch 3 examples to swift