add_balance_table function

Add the balancing table to the final output