add total to tables