fiddling with variable types in Swift