     public init() {}
 
     public static func post(_ name: String, from object: NSObject? = nil, payload: Any? = nil) {
-        NotificationCenter.default.post(name: Notification.Name(rawValue: name),
+        NotificationCenter.default.post(
+            name: Notification.Name(rawValue: name),
             object: object,
             userInfo: payload.map { [PayloadContainer.Key: PayloadContainer(payload: $0)] }
         )

    }
    
    // MARK: private methods
    fileprivate func addToPool(_ name: String, object: AnyObject?, queue: OperationQueue?, block: @escaping (Notification) -> Void) {
        pool.append(ObserverContainer(name: name, object: object, queue: queue, block: block))
    }
    
    fileprivate func removeFromPool(_ name: String) {
        pool = pool.filter { $0.name != name }
    }
    
    fileprivate func payloadFromNotification(_ notification: Notification) -> Any? {
        return (notification.userInfo?[PayloadContainer.Key] as? PayloadContainer)?.payload
    }
    

    
    public func observe<T>(_ name: String, from object: AnyObject? = nil, queue: OperationQueue? = nil, block: @escaping (_ notification: Notification, _ payload: T) -> Void) {
        addToPool(name, object: object, queue: queue) { [weak self] in
            guard let payload = self?.payload(from: $0) as? T else { return }
            block($0, payload)
        }
    }
    
    public func observe<T>(_ name: String, from object: AnyObject? = nil, queue: OperationQueue? = nil, block: @escaping (_ payload: T) -> Void) {
        addToPool(name, object: object, queue: queue) { [weak self] in
            guard let payload = self?.payload(from: $0) as? T else { return }
            block(payload)
        }
    }
