modify document and delete comments