updated to latest swift terminology