prepare to format output.