reformat a line