migrating to swift