 // MARK: Text field delegate
 extension ProductViewController: UITextFieldDelegate {
 	func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+		//should only be allowed to use picker
 		if textField == categoryTextField {
 			return false
 		}
-		
+
 		guard textField == priceTextField else {
 			return true
 		}

				try realm?.write {
					product.brand = brandTextField.text ?? ""
					product.name = nameTextField.text ?? ""
					product.link = linkTextField.text ?? ""

					let price: Double?

		setExpirationDateText(with: product?.expirationDate ?? Date())
		categoryTextField.text = product?.category ?? ProductCategory.active.rawValue

		if let used = product?.numberUsed.value {
			numberUsedTextField.text = String(describing: used)
		}

		if let inStash = product?.numberInStash.value {
			numberInStashTextField.text = String(describing: inStash)
		}

		willRepurchaseSwitch.isOn = product?.willRepurchase.value ?? false

