rearranging files to their proper places