rearranging document text