formatted the terminal code