updating example for swift