reorganize, print to file