restructure data table