restructure documents