     }
   }
 
-// return width, height and frequency info for corresponding displayID
-// TODO: eliminate the use of DisplayInfo in favor of the newer, and more informative CGDisplayModeFromJSON
-struct DisplayInfo: Comparable & Equatable {
-  var width, height, scale, frequency, resolution:Int
-  var bps, depth:Int
-  var modeID:Int32
-  var mode:CGDisplayMode
-  //var colorDepth, resolution:Int
-
-  init(displayID:CGDirectDisplayID, modeFromJSON:CGDisplayModeFromJSON, mode:CGDisplayMode) {
-    width = modeFromJSON.Width
-    height = modeFromJSON.Height
-    resolution = modeFromJSON.kCGDisplayHorizontalResolution
-    modeID = Int32(modeFromJSON.IODisplayModeID)!
-    depth = modeFromJSON.DepthFormat
-    bps = modeFromJSON.BitsPerSample
-    
+struct MyDisplayMode {
+  let mode:CGDisplayMode
+  let modeFromJSON:CGDisplayModeFromJSON
+  init(mode:CGDisplayMode, modeFromJSON:CGDisplayModeFromJSON) {
     self.mode = mode
-    scale = modeFromJSON["scale"]        
-    frequency = modeFromJSON["frequency"]
-  }
-  // TODO: get rid of it,since we are not comparing DisplayInfo
-  static func < (lhs: Self, rhs: Self) -> Bool {
-    return lhs.scale != rhs.scale ? lhs.scale < rhs.scale : lhs.width < rhs.width
-  }
-
-  static func == (lhs: Self, rhs: DisplayUserSetting) -> Bool {
-    var bool = rhs.width == lhs.width
-
-    if rhs.height != nil { bool = bool && rhs.height == lhs.height }
-    if rhs.scale != nil { bool = bool && rhs.scale == lhs.scale }
-    return bool
-  }
-
+    self.modeFromJSON = modeFromJSON
+  }
 }
 
 
 // DisplayMode & DisplayID management center
 class DisplayManager {
   let displayID:CGDirectDisplayID,
-      displayInfo:[DisplayInfo],
+      displayInfo:[MyDisplayMode],
       modeID:Int32,
       mode: CGDisplayMode
 

    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

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