             purity = Double(purityTextField.text!)!
         }
     }
-
-
 }
 
 // MARK: - TextFieldDelegate

    // MARK: - View life cycle
    override func viewDidLoad() {
        super.viewDidLoad()
        nameTextField.delegate = self
        formulaTextField.delegate = self
        molecularMassTextField.delegate = self
        purityTextField.delegate = self
        
        // Set up views if editing an existing Compound
        self.title = name

        return (!textField.text!.isEmpty) && (Double(textField.text!) == nil)
    }

    // MARK: - Navigation

     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
