             
             assert(requests.isEmpty == false)
             
-            var newValues = [Data](repeating: Data(), count: requests.count)
+            var writeRequests = [GATTWriteRequest]()
+            writeRequests.reserveCapacity(requests.count)
             
             // validate write requests
-            for (index, request) in requests.enumerated() {
+            for request in requests {
                 
                 let peer = Central(request.central)
                 

                
                let uuid = BluetoothUUID(coreBluetooth: request.characteristic.uuid)
                
                let newBytes = request.value ?? Data()
                
                var newValue = value
                let appendedByteCount = request.offset + newBytes.count - newValue.count
                newValue.append(Data(count: appendedByteCount))
                newValue.replaceSubrange(request.offset ..< request.offset + newBytes.count, with: newBytes)
                
                let writeRequest = GATTWriteRequest(central: peer,
                                                        maximumUpdateValueLength: request.central.maximumUpdateValueLength,

                }
                
                // compute new data
                writeRequests.append(writeRequest)
            }
            
            // write new values
            for request in writeRequests {
                
                // update GATT DB
                database[characteristic: request.handle] = request.newValue
                
                // did write callback
                didWrite?(request)
            }
            
            internalManager.respond(to: requests[0], withResult: .success)
