   func set(with setting: DisplayUserSetting) {
     print("setting", setting)
     // comparing DisplayUserSetting with DisplayInfo
-    guard let di = displayInfo.last(where: { setting == $0 }) else{
+    guard let di = displayInfo.last(where: { $0.modeFromJSON == setting }) else{
       print("This mode is unavailable")
       return
     }

    let rs = rhs["scale"]
    return ls != rs ? ls < rs : lhs.Width < rhs.Width
  }

  // for property loop in mode filtering
  // and as a side effect, we could accomplish `RefreshRate` type coersion

    hasher.combine(kCGDisplayPixelsWide)
    hasher.combine(kCGDisplayPixelsHigh)
  }
  /*func debug() -> String {
    return "s:\(self["scale"]),w:\(self.Width),h:\(self.Height)"
  }*/
  // loose comparison for Diction Key
  static func == (lhs: Self, rhs: Self) -> Bool {
    return lhs.Width == rhs.Width && lhs.kCGDisplayPixelsWide == rhs.kCGDisplayPixelsWide &&
          lhs.Height == rhs.Height && lhs.kCGDisplayPixelsHigh == rhs.kCGDisplayPixelsHigh
  }
  // strict comparison
  static func ~=(lhs: Self, rhs: Self) -> Bool {
    return lhs == rhs && lhs["frequency"] == rhs["frequency"] && 
      lhs["kCGDisplayHorizontalResolution"] == rhs["kCGDisplayHorizontalResolution"]
