Swift learning: following steps from tutorial at https://developer.apple.com/swift/blog/?id=16