transform the list to table