terminal UI optimaization for MacOS added