Added formatOutput.