Added consoleWidth not tested