updated to be compatible with changes in Swift beta 5