populates the table and add a row for total