                 
                 if singleDisplayMode == true {
                     displayIndex = 0
-                    designatedWidthOptional = CommandLine.arguments[2].toUInt()
+                    designatedWidthOptional = argv[2].toUInt()
                     
                 }
                 

            var singleDisplayMode = false

            
            if  var displayIndex = Int(CommandLine.arguments[2]) {
                if argc < 4 {
                    if displayIndex < 10 {
                        print("Specify display width")

    return nil
}

func PrintDisplayModes(_display:CGDirectDisplayID?, index:Int, _modes:[CGDisplayMode]?) -> Void {
    if let display = _display {
        if let modes = _modes {
            print("Supported Modes for Display \(index):")
