format output for input