re-structure the file