calculate column widths