
417 A.2d 453 (1980)
George BENEDIX, Sr., and Dorothy Benedix
v.
BOSTON OLD COLONY INSURANCE COMPANY.
Supreme Judicial Court of Maine.
Argued June 18, 1980.
Decided August 5, 1980.
*454 Platz & Thompson, P.A., John M. Whalen, Lewiston (orally), for plaintiffs.
Preti, Flaherty & Beliveau, John J. Flaherty, Joel C. Martin, Portland (orally), for defendant.
Before McKUSICK, C. J., and WERNICK, NICHOLS, GLASSMAN and ROBERTS, JJ.
NICHOLS, Justice.
Upon a "reach and apply" action brought in Superior Court, Oxford County, by the plaintiffs, George Benedix, Sr., and Dorothy Benedix, against the Defendant, Boston Old Colony Insurance Company, pursuant to 24-A M.R.S.A. § 2904, that court granted the Defendant's motion to dismiss, and the Plaintiffs bring the case here on appeal from that order of dismissal.
We sustain the appeal.
The pertinent facts may be briefly summarized. On January 22, 1976, the Plaintiffs and Robert Dakin were involved in an automobile accident in West Peru, Maine. The Plaintiffs thereafter recovered judgment for personal injuries and property damage against Dakin in Superior Court, Oxford County, in the amount of $42,000.
Upon Dakin's failure to satisfy that judgment, the Plaintiffs commenced this action against the Defendant insuror, which company prior to the accident had issued a family automobile insurance policy to Dakin. They sought to have that policy applied in satisfaction of their judgment pursuant to 24-A M.R.S.A. § 2904.[1] The Defendant had been notified of the accident, injuries and damages before the Plaintiffs recovered judgment against Dakin.
The Defendant promptly moved to dismiss for failure to state a claim upon which relief could be granted, pursuant to M.R. Civ.P. 12(b)(6). We are provided with no transcript of the hearing on that motion held January 7, 1980.
It appears that the parties and the court were agreed that the motion to dismiss should be treated as a motion for summary judgment. M.R.Civ.P. 12(b). The order which the court entered, however, simply stated that the motion to dismiss was granted. Because the record reveals that an affidavit which accompanied the Defendant's motion was not excluded by the court, thus requiring the motion to be treated as one for summary judgment, M.R.Civ.P. 12(b), and because from both the record and the argument it is apparent that the parties understood that it would be regarded as such, for purposes of this appeal we shall treat the order of the court as granting summary judgment.[2]
In acting upon the Defendant's motion the Superior Court had before it the complaint, in which there was incorporated a copy of certain portions, but not all, of the insurance policy; an affidavit made by an employee of the Defendant; and the Defendant's motion to dismiss. The central facts which emerged from these sources are that the Defendant issued a family automobile insurance policy to Dakin for an initial policy period of April 23, 1975, to July 23, *455 1975; that Dakin paid the premium due for the initial period on June 28, 1975; and that Dakin made no further payments.
The issue joined on this appeal is whether the Superior Court erred in ruling that the automobile insurance policy was not still in effect on January 22, 1976, the date of the accident involving the Plaintiffs and Dakin.
The Plaintiffs argue that the Defendant agreed by the terms of the policy to renew automatically Dakin's policy for continuous three month periods for one year, from April 23, 1975, to April 23, 1976, regardless of Dakin's obligations to pay premiums for these successive periods. It is the Plaintiffs' argument that the policy would terminate for failure to pay premiums only at the end of a year. They contend that although coverage could be avoided by the Defendant by cancellation of the policy, the Defendant did not cancel because it failed to provide notice of cancellation as required by the policy.
It is the Defendant's argument, on the other hand, that an "Amendatory Endorsement" provision of the policy provided for termination of the policy for non-payment of premiums on August 2, 1975, the last day on which the payment of the premium for a renewal period of three months could be made; that the policy was not cancelled and the Defendant was thus not required by the policy or by statute to notify its insured.
In sum, we are asked to interpret the language of the insurance contract in order to determine the rights and obligations of the parties.
From the limited record before us, the policy language which is critical to a determination of the issue presented here appears to be ambiguous. Nevertheless, we shall not interpret the provisions of a policy when we lack the entire document. This record on appeal contains only selected amendatory provisions of the insurance policy. Analysis of the entire policy might, or might not, illuminate the provisions which, standing alone, seem ambiguous.
It is a well established principle that a writing is to be interpreted as a whole. Connellan v. Federal Life and Casualty Co., 134 Me. 104, 106, 182 A. 13, 13 (1936); Palmer v. Nisson, 256 F.Supp. 497, 503 (D.C. Me.1966) citing Ames v. Hilton, 70 Me. 36, 43 (1879). The Court did not have the whole before it.
The Superior Court, therefore, had inadequate facts before it upon which to announce an interpretation of the rights and obligations of the parties under the policy. When there is an inadequate factual basis a court should deny summary judgment.
As this Court has previously observed, "summary judgment is an extreme remedy which should be cautiously invoked." Haskell v. Planning Board of Yarmouth, Me., 388 A.2d 100, 102 (1978); citing Cardinali v. Planning Board of Lebanon, Me., 373 A.2d 251, 255 (1977).
In this case we can understand how the Superior Court may have been led astray by counsels' eagerness to have the issue resolved on those portions of the insurance policy they had extracted for the record. It was improper, however, for it to grant Defendant's motion without consideration of the entire policy.
The entry is:
Appeal sustained.
Judgment vacated.
Remanded to the Superior Court for further proceedings consistent with the opinion herewith.
Costs allowed to Appellants.
All concurring.
NOTES
[1]  24-A M.R.S.A. § 2904 provides in pertinent part:

Whenever any person, administrator, executor, guardian, recovers a final judgment against any other person for any loss or damage specified in section 2903, the judgment creditor shall be entitled to have the insurance money applied to the satisfaction of the judgment by bringing a civil action, in his own name, against the insurer to reach and apply the insurance money, if when the right of action accrued, the judgment debtor was insured against such liability and if before the recovery of the judgment the insurer had had notice of such accident, injury or damage.
[2]  We would remind counsel that any clerical mistakes or inaccuracies in the order of the trial court may be corrected by that court on the motion of any party. M.R.Civ.P. 60(a).
