#### SHANNON CONWAY, Plaintiff and Appellee, v. BENEFIS HEALTH SYSTEM, INC., Defendant and Appellant.

No. DA 12-0180.

Submitted on Briefs January 23, 2013.

Decided March 19, 2013.

2013 MT 73.

297 P.3d 1200.

369 Mont. 309.

*310For Appellant: Leo S. Ward, David M. McLean, Daniel J. Auerbach, Christy S. McCann, Browning, Kaleczyc, Berry & Hoven, P.C., Missoula.

For Appellee: Alexander (Zander) Blewett, III, Andrew (Drew) Blewett, Hoyt & Blewett, Great Falls.

For Amicus Curiae: Ian McIntosh, Steven R. Milch, Kenneth K. Lay, Crowley Fleck PLLP, Billings.

JUSTICE COTTER

delivered the Opinion of the Court.

¶ 1 Benefis Health System, Inc. (Benefis) appeals several orders of the Eighth Judicial District Court, Cascade County, issued in an individual and class action lawsuit filed against Benefis by Shannon Conway (Conway). First, Benefis alleges that the District Court improperly converted Conway’s motion for judgment on the pleadings into a motion for summary judgment. Next, Benefis challenges the District Court’s grant of summary judgment on Conway’s individual breach of contract claims. Lastly, Benefis appeals from the District Court’s order certifying the matter as a class action. We affirm the District Court’s conversion of the motion for judgment on the pleadings to a motion for summary judgment and reverse the District Court’s order of summary judgment. Based on our reversal of summary judgment, we do not reach the class certification issue. We affirm in part and reverse in part.

ISSUES

¶2 Benefis raises the following three issues on appeal:

¶3 1. Did the District Court err in converting Conway’s motion for

judgment on the pleadings to a motion for summary judgment?

¶4 2. Did the District Court err in granting summary judgment to Conway?

¶5 3. Did the District Court err in granting Conway’s motion to certify the class?

FACTUAL AND PROCEDURAL BACKGROUND

¶6 On November 6, 2009, Conway was injured in an automobile accident and received medical treatment at Benefis. Conway had healthcare coverage as a TRICARE beneficiary and also had medical payments coverage through his automobile insurance carrier, Kemper. TRICARE is a Department of Defense healthcare benefits program *311that is regionally administered by TriWest Healthcare Alliance (TriWest). TRICARE provides benefits to members of the military and their families. TriWest employed Blue Cross Blue Shield, Inc. (BCBS) as a network subcontractor to establish a provider network. BCBS entered into a preferred provider agreement (PPA) with Benefis.

¶7 Conway’s medical treatment costs totaled $2,073.65. Benefis billed TriWest, Kemper, and other insurers for this amount. Benefis received payment from TRICARE on January 26, 2010. Benefis accepted $662.74 from TRICARE as payment in full satisfaction of the bill. Benefis accepted this reduced amount pursuant to the PPA between BCBS and Benefis, which provided in pertinent part as follows:

> Provider agrees to treat TRICARE Beneficiaries according to the terms and conditions of this Agreement and in accordance with all applicable laws, rules and regulations pertaining to TRICARE including, but not limited to, the TRICARE manuals and the Code of Federal Regulations (CFR). Provider shall accept the Reimbursement Rates (less the amount of any Copayments payable by the TRICARE Beneficiary) as the only payment expected from TriWest and TRICARE Beneficiaries for Covered Services, and for all services paid for by the TRICARE program. TRICARE Beneficiaries are responsible only for Copayments. The Reimbursement Rates shall apply to Active Duty and civilian claims, to enrollees and to non-enrollees, and to all TRICARE Beneficiaries whose care is reimbursed by the Department of Defense, regardless of their residence. In no event will Provider be paid for such services more than the TRICARE/CHAMPUS Maximum Allowable Charge (CMAC) or applicable TRICARE DRG rate or what is permissible under Federal law or TRICARE policy.

On February 4, 2010, Benefis received payment of $1,866.29 from Kemper. Upon receiving payment from Kemper, Benefis reimbursed TRICARE’s payment in full. As is the case with Medicaid and Medicare programs, TRICARE functions as a secondary payer.

¶8 On December 9,2010, Conway filed his individual and class action complaint. Conway claimed that he was entitled to the additional $1,203.55 that Benefis received from Kemper over and above the TRICARE reimbursement rate. The complaint alleged individual and class action claims against Benefis for breach of contract, breach of third party beneficiary contract, and intentional interference with contractual relations. The complaint also included individual claims of fraud and violation of Montana’s Consumer Protection Act.

*312¶9 On January 14, 2011, Benefis filed a notice of removal of the action to the United States District Court for the District of Montana, Great Falls Division, on the basis of federal subject matter jurisdiction under 28 U.S.C. § 1441(b) and (c). On March 2, 2011, the federal court determined that there was no basis for federal jurisdiction and granted Conway’s motion to remand the case back to Montana’s Eighth Judicial District Court, Cascade County.

¶10 On March 25, 2011, Conway filed a motion requesting that the District Court issue an order certifying the matter as a class action pursuant to M. R. Civ. P. 23. Conway asserted that Benefis has entered into multiple agreements with health insurers to accept reduced payments for medical services, and that it then violates those contracts by accepting payments in full from third party insurers. Conway sought certification of a class to include “all persons who are Benefis patients and insureds and/or beneficiaries of TRICARE, BCBSMT, or other health insurers and from whom Benefis has accepted payments in excess of the predetermined and previously agreed upon ‘reimbursement rate.’ ” Benefis opposed Conway’s motion for an order certifying the class.

¶11 On April 25, 2011, Conway filed a motion for judgment on the pleadings pursuant to M. R. Civ. P. 12(c). Conway asked the District Court to find that Benefis breached its contract with TRICARE1 and that Benefis was liable for Conway’s damages caused by the breach as a matter of law. Conway asserted that Benefis had admitted in its answer each fact necessary to conclude that it had breached the contract. Benefis countered that judgment on the pleadings was not appropriate because it had raised several affirmative defenses and challenged many of Conway’s assertions that were central to his breach of contract claim.

¶12 After the motion was fully briefed, the District Court issued an order on August 25,2011. First, the District Court converted the Rule 12(c) motion into a M. R. Civ. P. 56 motion for summary judgment so that it could consider documents outside the pleadings in reaching a decision. Specifically, the District Court considered the PPA, which had been attached to Benefis’ response brief. The District Court reviewed the language of the PPA and determined that Conway was an intended beneficiary of the PPA. Next, the District Court granted summary judgment in favor of Conway and concluded that Benefis *313breached the PPA by accepting more money for its services than the maximum allowable charge.

¶13 On December 1, 2011, Benefis petitioned this Court for a writ of supervisory control. Benefis sought review of the District Court’s conversion of the motion for judgment on the pleadings to a motion for summary judgment and the District Court’s grant of partial summary judgment in favor of Conway on his individual breach of contract claims. We denied Benefis’ petition for supervisory control on January 18, 2012, concluding that Benefis failed to establish urgency or emergency factors that would render the normal appeal process inadequate.

¶14 The District Court held oral argument on Conway’s motion to certify the class on November 16,2011. The District Court awaited this Court’s decision on Benefis’ petition for a writ of supervisory control before issuing its order on class certification. On March 7, 2012, the District Court issued an order granting Conway’s motion to certify the class. The District Court determined that Conway satisfied the four prerequisites set forth in Rule 23(a): (1) numerosity; (2) commonality; (3) typicality; and (4) adequacy of representation. Next, the District Court concluded that class certification was appropriate under Rule 23(b)(3) because it was “clearly desirable to concentrate the litigation of the claims in this forum and the difficulties of managing the litigation are comparatively minor.” Since the fundamental issue in the litigation involved recovery of the excess payments collected by Benefis, the District Court reasoned that once all the data was collected, the matter could be resolved by mathematical calculation.

¶15 On May 4,2012, the District Court entered final judgment on the conversion of the motion for judgment on the pleadings to a motion for summary judgment, the entry of summary judgment on Conway’s individual breach of contract claims, and the certification of the class. Benefis appeals.

STANDARDS OF REVIEW

¶16 Since a motion for judgment on the pleadings is decided as a matter of law, we review a district court’s decision for correctness. *Ritter v. Bill Barrett*Corp., 2009 MT 210, ¶ 10, 351 Mont. 278, 210 P.3d 688; *Nelson v. Barlow,*2008 MT 68, ¶ 9, 342 Mont. 93, 179 P.3d 529.

¶17 We review a district court’s ruling on a motion for summary judgment de novo, applying the same criteria of M. R. Civ. P. 56 as did the district court. *Reichert v. State,*2012 MT 111, ¶ 18, 365 Mont. 92, 278 P.3d 455; *Shattuck v. Kalispell Reg’l Med. Ctr.,*2011 MT 229, ¶ 8, *314362 Mont. 100,261 P.3d 1021. Summary-judgment “should be rendered if the pleadings, the discovery- and disclosure materials on file, and any affidavits show that there is no genuine issue as to any material fact and that the movant is entitled to judgment as a matter of law.” M. R. Civ. P. 56(c)(3).

¶18 We review a district court’s decision on a motion for class certification for an abuse of discretion. *LaMere v. Farmers Ins. Exch.,*2011 MT 272, ¶ 14, 362 Mont. 379, 265 P.3d 617; *Hop v. Safeco Ins. Co.,*2011 MT 215, ¶ 9, 361 Mont. 510, 261 P.3d 981.

DISCUSSION

¶19 *Did the District Court err in converting Conway’s motion for judgment on the pleadings to a motion for summary judgment*?

¶20 Conway’s motion for ajudgment on the pleadings, and the District Court’s subsequent conversion of the motion to a motion for summary judgment, is governed by M. R. Civ. P. 12(c) and (d), which provide as follows:

> (c) Motion for Judgment on the Pleadings. After the pleadings are closed-but early enough not to delay trial-a party may move for judgment on the pleadings.

> (d) Result of Presenting Matters outside the Pleadings. If, on a motion under Rule 12(b)(6) or 12(c), matters outside the pleadings are presented to and not excluded by the court, the motion must be treated as one for summary judgment under Rule 56. All parties must be given a reasonable opportunity to present all the material that is pertinent to the motion.

A party moving for judgment on the pleadings pursuant to Rule 12(c) must establish that no issues of fact exist and that it is entitled to judgment as a matter of law. *Curtis v. Citibank,*2011 MT 247, ¶ 6, 362 Mont. 211, 261 P.3d 1059; *Ritter,*¶ 10. A court must assume that all of the well-pleaded factual allegations in the nonmovant’s pleadings are true and that all contravening assertions in the movant’s pleadings are false when evaluating a Rule 12(c) motion. *Curtis,*¶ 6; *Firelight Meadows, LLC v. 3 Rivers Telephone Coop., Inc.,*2008 MT 202, ¶ 11, 344 Mont. 117, 186 P.3d 869. A motion for judgment on the pleadings is appropriate in situations where all material allegations of fact are admitted or not controverted in the pleadings, and only questions of law remain to be decided by the court. *Curtis,*¶ 6; *Firelight Meadows,*¶10.

¶21 This Court has previously held that Rule 12(c) requires only that a party be given a “reasonable opportunity” to present material *315pertinent to a motion for summary judgment. *See Rafanelli v. Dale,*1998 MT 331, ¶ 22, 292 Mont. 277, 971 P.2d 371; *Bretz v. Ayers,*232 Mont. 132, 136, 756 P.2d 1115, 1118 (1988). A litigant has a “reasonable opportunity” if he is “fairly apprised” that the court may consider other documents and treat the motion for judgment on the pleadings as a motion for summary judgment. *Rafanelli,*¶ 22; *Bretz,*232 Mont, at 136, 756 P.2d at 1118.

¶22 In *Rafanelli,*the non-moving party responded to a motion for judgment on the pleadings by requesting that the district court take judicial notice of the pleadings from an earlier case. *Rafanelli,*¶ 20. The district court took judicial notice of the earlier case and converted the motion to a motion for summary judgment because it had considered matters outside the pleadings. *Rafanelli,*¶ 20. The non-moving party argued that the district court erred in converting the motion because it did not provide him with a reasonable opportunity to present other pertinent materials and he had no notice of what matters the district court would rely on in reaching its decision. *Rafanelli,*¶ 21. We held that the district court did not err because the non-moving party who was challenging the conversion of the motion was the same party that had requested that the court consider matters outside the pleadings. *Rafanelli,*¶ 23.

¶23 In *Bretz,*we upheld a district court’s conversion of a M. R. Civ. P. 12(b)(6)2 motion to dismiss to a motion for summary judgment under circumstances similar to those in the instant case. Bretz attached eleven documents to his response brief opposing the motion to dismiss and referred to the contents of those documents throughout his brief. *Bretz,*232 Mont, at 135, 756 P.2d at 1117. Since Bretz himself had introduced the additional documents and invited the district court to consider them, we determined that he was fairly apprised that the court could treat the motion as a motion for summary judgment, and he had a reasonable opportunity to present pertinent material to the court. *Bretz,*232 Mont, at 136, 756 P.2d at 1118.

*316¶24 Here, Conway filed the motion for judgment on the pleadings. Benefis attached the PPA to its response brief in opposition to the motion. Benefis specifically requested that the District Court base its decision on the language and contents of the PPA. Benefis stated in its brief that the District Court “must examine the contract which forms the basis of Plaintiffs breach of contract claim in its entirety prior to considering the merits of Plaintiffs breach of contract claim, so that contract is attached to this Response as Exhibit 1.” Relying on *Rafanelli*and *Bretz,*we will not allow Benefis to attach documents outside the pleadings and encourage the District Court to consider those documents, and then later claim that it was not “fairly apprised” that the District Court would be required to convert the motion for a judgment on the pleadings to a motion for summary judgment.

¶25 Benefis argues that *Firelight Meadows*controls the outcome of this case because the PPA was a part of the pleadings. In *Firelight Meadows,*the plaintiff attached a contract to its complaint. *Firelight Meadows,*¶ 5. The defendant filed an answer and later filed a motion for judgment on the pleadings. *Firelight Meadows,*¶ 6. The district court granted the defendant’s motion, and the plaintiff appealed contending that the district court failed to provide it with notice and an opportunity to present additional materials. *Firelight Meadows,*¶¶ 7-8. This Court held that the district court did not improperly consider matters outside the pleadings because the agreement attached to the complaint was a part of the pleadings pursuant to M. R. Civ. P. 10(c), which provides as follows:

> Adoption by Reference; Exhibits. A statement in a pleading may be adopted by reference elsewhere in the same pleading or in any other pleading or motion. A copy of a written instrument that is an exhibit to a pleading is a part of the pleading for all purposes.

*Firelight Meadows,*¶ 15. Since the agreement was appended to and referenced in the plaintiffs complaint, it constituted part of the pleadings. *Firelight Meadows,*¶ 15.

¶26 Unlike *Firelight Meadows,*the PPA was not attached to any of the parties’ pleadings. Instead, the PPA was attached as an exhibit to Benefis’ response brief to Conway’s motion for judgment on the pleadings. Rule 10(c) incorporates into the pleadings “a written instrument that is an exhibit to a *pleading.”*M. R. Civ. P. 10(c) (emphasis added). Here, since the PPA was not attached as an exhibit to a pleading, Rule 10(c) is inapplicable and our holding in *Firelight Meadows*is not controlling.

*317¶27 Our review of the record also demonstrates that during a July 20, 2011 hearing on a separate motion, the District Court asked counsel for both parties if they desired a hearing on any pending motions, including Conway’s motion for judgment on the pleadings. Benefis represented to the District Court that all of the pending motions could be determined on the briefs. At this point in the litigation, Benefis had already received Conway’s reply brief on the motion for judgment on the pleadings, in which he asserted that Benefis’ attachment of the PPA effectively converted the motion to a motion for summary judgment. Benefis opted to forego oral argument and registered no objection to Conway’s assertion that the matter had been converted to a summary judgment determination. Under these circumstances, Benefis cannot claim that it was unaware that the District Court might convert the motion to a motion for summary judgment, nor can it claim that it had no reasonable opportunity to present additional pertinent material.

¶28  Accordingly, we hold that the District Court did not err in converting Conway’s Rule 12(c) motion for judgment on the pleadings into a motion for summary judgment.

¶29 *Did the District Court err in granting summary judgment to Conway?*

¶30 After the District Court converted Conway’s motion for judgment on the pleading into a motion for summary judgment, it granted summary judgment in favor of Conway on his individual breach of contract claims. First, the District Court determined that Conway was an intended third party beneficiary of the PPA. Second, the District Court concluded that Benefis breached the PPA by accepting payment from Kemper in excess of the TRICARE reimbursement rate. Benefis maintains that Conway is not a third party beneficiary, did not suffer any damages, and lacks standing to bring his claims. Furthermore, Benefis asserts that it was entitled to accept payments from Kemper in excess of the TRICARE reimbursement rate.

¶31 We begin our analysis of Conway’s breach of contract claims with an examination of the pertinent language of the PPA. Again, the PPA provides as follows:

> Provider agrees to treat TRICARE Beneficiaries according to the terms and conditions of this Agreement and in accordance with all applicable laws, rules and regulations pertaining to TRICARE including, but not limited to, the TRICARE manuals and the Code of Federal Regulations (CFR). Provider shall accept the Reimbursement Rates (less the amount of any Copayments *318payable by the TRICARE Beneficiary) as the only payment expected from TriWest and TRICARE Beneficiaries for Covered Services, and for all services paid for by the TRICARE program. TRICARE Beneficiaries are responsible only for Copayments. The Reimbursement Rates shall apply to Active Duty and civilian claims, to enrollees and to non-enrollees, and to all TRICARE Beneficiaries whose care is reimbursed by the Department of Defense, regardless of their residence. In no event will Provider be paid for such services more than the TRICARE/CHAMPUS Maximum Allowable Charge (CMAC) or applicable TRICARE DRG rate or what is permissible under Federal law or TRICARE policy.

The PPA governs payments made by TRICARE to Benefis for “Covered Services.” The PPA defines “Covered Services” as: “Services, items and supplies for which benefits are available to TRICARE Beneficiaries in accordance with the rules, regulations, policies and instructions of TRICARE Management Activity.”

¶32 Benefis and amicus curiae argue that the medical services Conway received were not “Covered Services” as defined in the PPA. As noted by the District Court, federal regulations mandate that TRICARE functions as a secondary payer. 32 C.F.R. § 199.8(a). In situations where the medical treatment at issue is necessitated as a result of the negligence of an insured third party, any payment originally made by TRICARE must be reimbursed. *See*32 C.F.R. § 199.8(a), (b)(3). No TRICARE benefits are available to a TRICARE beneficiary where there is third party insurance available to pay the expenses of medical treatment. It is only where there is no such available third party coverage that the services become “Covered Services” under the PPA. While Benefis is required under the PPA to accept the TRICARE rates for “Covered Services,” nothing in the PPA prohibits Benefis from accepting a greater amount from the responsible insurer, in this case Kemper. Kemper is a stranger to the PPA. As such, the rates at which Kemper reimburses Benefis are not dictated by the PPA.

¶33 Central to Conway’s breach of contract claims is his assertion that he is owed the difference between the $1,866.29 Benefis accepted from Kemper and the $662.74 paid by TRICARE pursuant to the PPA. Conway contends that he was entitled to recover this $1,203.55 as damages. However, the nature of medical payments coverage and the facts of this case do not support Conway’s assertions that he is entitled to recover the alleged damages.

*319¶34 This Court’s decision in *Newbury v. State Farm Fire & Cas. Ins. Co.,*2008 MT 156, 343 Mont. 279, 184 P.3d 1021, is instructive. In *Newbury,*the plaintiff was a snowplow driver who was injured while attempting to assist a driver stuck in a ditch. *Newbury,*¶ 7. The plaintiff incurred medical expenses totaling $18,405. *Newbury,*¶ 8. The plaintiff filed a workers’ compensation claim and the State Fund paid all but $1,175 of his medical expenses. *Newbury,*¶ 8. The plaintiff submitted a claim to his automobile insurance provider, State Farm, requesting payment of the full $10,000 medical payment coverage limits. *Newbury,*¶ 10. State Farm paid the remaining medical expenses of $1,175. *Newbury,*¶ 10. The plaintiff filed suit against State Farm, seeking additional payment under his medical payment coverage, even though his medical bills had been fully paid. *Newbury,*¶ 11. We determined that “while it was reasonable for Newbury to expect that his State Farm policies would pay his medical expenses (up to the policy limits of $ 10,000.00) once the State Fund had paid all it was required to pay, it was not reasonable for Newbury to expect to receive funds in excess of his medical expenses.” *Newbury,*¶ 38. This Court recognized that medical payment benefits are payable only for medical expenses, and the undisputed facts demonstrated that the plaintiff received full payment of his medical expenses and owed nothing more to his healthcare providers. *Newbury,*¶ 39. We ultimately upheld State Farm’s refusal to pay more than the medical expenses actually incurred because a windfall would result if the plaintiff were to receive additional money under his medical payments coverage in excess of his total medical expenses. *Newbury,*¶ 47.

¶35 Here, the record shows that Benefis accepted Kemper’s payment of $1,866.29 as payment in full for the actual cost of Conway’s medical treatment that resulted from the accident. Conway does not owe Benefis any remaining amount. Even though all of Conway’s medical expenses have been paid, he still seeks to pocket $1,203.55 in medical payments coverage benefits, representing the difference between Kemper’s payment to Benefis and the TRICARE reimbursement rate. We disagree. Conway is no more entitled to pocket excess medical payments here than he would be under the circumstances in *Newbury,*or any other situation in which all of his medical expenses are paid by his insurer under its medical payments coverage. Although the circumstances of this case are somewhat complicated by the PPA situation, this does not alter the basic premise that medical payments coverage is for the payment of medical expenses only; it does not provide for the payment of additional or excess sums to the insured. *320The District Court’s order of summary judgment wrongly endorses the type of windfall recovery expressly disapproved in *Newbury.*

¶36 Conway claims and the District Court concluded that Conway was an intended beneficiary of the PPA. In light of our resolution here on alternate grounds, we need not address the correctness of this ruling. However, even if we were to consider Conway an intended beneficiary of the PPA, he still could establish no entitlement to damages from Benefis.

¶37 In determining damages for a breach of contract action, Montana law provides:

> Breach of contract. For the breach of an obligation arising from contract, the measure of damages, except when otherwise expressly provided by this code, is the amount which will compensate the party aggrieved for all the detriment which was proximately caused thereby or in the ordinary course of things would be likely to result therefrom. Damages which are not clearly ascertainable in both their nature and origin cannot be recovered for a breach of contract.

Section 27-1-311, MCA. Furthermore, “[a] person may not recover a greater amount in damages for the breach of an obligation than the person could have gained by the full performance of the obligation on both sides unless a greater recovery is specified by statute.” Section 27-1-303, MCA. Pursuant to these statutes governing the measure of damages for breach of contract actions, the undisputed facts reveal that Conway suffered no loss or harm due to Benefis’ actions. Regardless of the difference between what Kemper paid and what Benefis was contractually entitled to accept, the record shows that Conway’s medical bills were paid in full and he was not personally entitled to receive any additional payments directly from Kemper under his medical payments coverage. This being so, he cannot by extension establish that Benefis must pay to him the money Kemper paid to it for medical expenses. Benefis simply has not proximately caused any damages to Conway. Therefore, Conway has failed to demonstrate that he suffered a compensable injury as a result of Benefis’ purported breach of contract.

¶38  n light of our conclusions that Conway is not entitled to pocket the difference between the TRICARE reimbursement rate and the amount Benefis accepted from Kemper, and that Conway has failed to establish any damages that resulted from the alleged breach, the District Court’s grant of summary judgment was improper. We therefore hold that the District Court erred in granting summary *321judgment to Conway. Notably, we do not address here whether and under what circumstances Benefis is entitled to retain the full payment for medical expenses in those situations where PPAs are in play, as that is not the issue before us. We determine only that Conway is not entitled to recover these sums.

¶39 Based on our resolution of this issue, it is unnecessary to reach the District Court’s grant of Conway’s motion to certify the class. The District Court’s decision to certify the matter as a class action was premised on its conclusion that Conway was entitled to judgment as a matter of law on his breach of contract claims, and could therefore represent others with similar claims.

CONCLUSION

¶40 For the foregoing reasons, we affirm the District Court’s conversion of Conway’s motion for judgment on the pleadings to a motion for summary judgment, but reverse the District Court’s grant of summary judgment in favor of Conway.

CHIEF JUSTICE McGRATH, JUSTICES BAKER, McKINNON and RICE concur.

1

 No contract actually existed between Benefis and TRICARE. Conway intended to refer the District Court to the PPA between Benefis and BCBS.

2

 M. R. Civ. P. 12(b)(6) (1987) was analogous to Rule 12(c). It was governed by the following similar provision: “If, on a motion asserting the defense numbered (6) to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleadings are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such motion by Rule 56.”