reformat main and data