Descartes argument in Mediation

Explain Descartes argument in Mediation 6 for the existence of a material world? Does Berkeley have a refutation of this argument? Does Berkeley’s refutation work if Descartes is right that we have a purely intellectual idea of extension? Explain why or why not.