formatted output for print_table correctly