Updated addDocument method.