update syntax to beta 3 swift