convert data to table