     public func writeValue(_ data: Data,
                            for characteristic: Characteristic,
                            type: CBCharacteristicWriteType) -> Observable<Characteristic> {
-            return .create { observer in
-                let disposable: Disposable
-                switch type {
-                case .withoutResponse:
-                    disposable = self.ensureValidPeripheralState(for: .just(characteristic)).subscribe(observer)
-                case .withResponse:
-                    disposable = self.ensureValidPeripheralState(for: self.monitorWrite(for: characteristic).take(1))
-                        .subscribe(observer)
-                }
-                self.peripheral.writeValue(data, for: characteristic.characteristic, type: type)
-                return disposable
-            }
+        let observable: Observable<Characteristic>
+        switch type {
+        case .withoutResponse:
+            observable = .just(characteristic)
+        case .withResponse:
+            observable = self.monitorWrite(for: characteristic).take(1)
+        }
+        return ensureValidStateAndCallIfNecessary(
+            for: observable,
+            call: { self.peripheral.writeValue(data, for: characteristic.characteristic, type: type) }
+        )
     }
 
     /**

                }
                return characteristic
            }
    }

    /*!

        }
        .take(1)

        return ensureValidStateAndCallIfNecessary(
            for: observable,
            call: { self.peripheral.discoverServices(serviceUUIDs) }
        )
    }

    /**
