         return nil
     }
     
-    func mode(width:Int) -> Int? {
+    func mode(width:Int, scale:Int) -> Int? {
         var index:Int?
         if let modesArray = self.modes() {
             for (i, m) in modesArray.enumerated() {
                 let di = DisplayInfo(displayID:displayID, mode:m)
-                if di.width == width {
+                if di.width == width && di.scale == scale {
                     index = i
                     break
                 }

                displayIndex = "0"
            }
        }
        
        guard let index = Int(displayIndex!), let width = Int(designatedWidth!) else {
            print("Unable to get display")
            return
        }

        let display = screens.display(at:index)
        
        guard let modeIndex = display.mode(width:width) else {
            print("This mode is unavailable for current desktop GUI")
            return
        }

        "   -l          list displays\n",
        "   -m 0        list all mode from a certain display\n",
        "   -s 0 800    set resolution of display 0 to 800*600\n",
        "   -s 0 800 2  set resolution of display 0 to 800*600@2x\n",
        ]).joined(separator:"")
    let help_display_list = "List all available displays by:\n    \(binary_name) -l"
    
