rearranges file structure