     self.translatesAutoresizingMaskIntoConstraints = false
   }
 }
+
+extension UIAlertController {
+  func addActions(_ actions: UIAlertAction...) {
+    actions.forEach { self.addAction($0) }
+  }
+}

      case " ":
        playSound(fileName: "break", ext: "wav")
      default:
        print("Eh?")
      }
    }
    playButton.isEnabled = true

  
  func transcribe() {
    
    telegram.setPlaintext(sectionOneText.text)
    telegram.setSubstitution(.ITU)
    
    switch telegram.getMethod() {
      case .some:
        if lowerHalfView.isHidden {
          lowerHalfView.isHidden = false
        }
        sectionTwoText.text = telegram.translate()!
      case .none:
        let alert = UIAlertController(title: "No Method Set.", message: "Please choose 'Morse to Phrase' or 'Phrase to Morse'", preferredStyle: .alert)
      
        let a1 = UIAlertAction(title: "To Morse", style: .default) { _ in
          self.telegram.setMethod(.ToMorse)
          self.transcribe()
        }
      
        let a2 = UIAlertAction(title: "To Phrase", style: .default) { _ in
          self.telegram.setMethod(.ToPhrase)
          self.transcribe()
        }
      
        let a3 = UIAlertAction(title: "Later", style: .cancel) { _ in
          self.dismiss(animated: true, completion: nil)
        }
      
      alert.addActions(a1, a2, a3)
      present(alert, animated: true, completion: nil)
    }
//    flashLight(withInterval: 40)
  }
  
