replace body by document (faster)