format output by width and add togglable header