restructure file