switched to format_output sub for previous usage