changed table.list to table.stack