reorganizing document