fix swift syntax for new version