updated to Swift 1.0