make the document consistent