  */
 public class Stream: Handle {
     
-    private var onRead: ReadStreamResult -> () = { _ in}
-    
-    private var onRead2: GenericResult<Pipe> -> () = { _ in }
-    
-    private var onWrite: Result -> () = {_ in }
-    
-    private var onShutDown: () -> () = {}
-    
     /**
      Initialize with Pointer of the uv_stream_t
      - parameter stream: Pointer of the uv_stream_t

    /**
     shoutdown connection
     */
    public func shutdown(_ completion: (() -> ())? = nil) {
        if isClosing() { return }
        
        if let onShutDown = completion {
            self.onShutDown = onShutDown
        }
        
        let req = UnsafeMutablePointer<uv_shutdown_t>(allocatingCapacity: sizeof(uv_shutdown_t))
        req.pointee.data = unsafeBitCast(self, to: UnsafeMutablePointer<Void>.self)
        uv_shutdown(req, streamPtr) { req, status in
            let stream = unsafeBitCast(req.pointee.data, to: Stream.self)
            stream.onShutDown()
            dealloc(req)
        }
    }

            return callback(.Error(SuvError.RuntimeError(message: "Stream is already closed")))
        }
        
        let onRead2: GenericResult<Pipe> -> () = { result in
            if case .Success(let queue) = result {
                let pipePtr = UnsafeMutablePointer<uv_pipe_t>(queue.streamPtr)
                if uv_pipe_pending_count(pipePtr) <= 0 {
