Summary judgment was entered for the defendants on the plaintiffs’ claims that they were entitled under G.L.c. 185, §15B(7) to recover three times the amount of their security deposit, plus costs and reasonable attorney’s fees, for the defendants' violations of the Massachusetts security deposit law.3 We must decide on *268this interlocutory appeal4 whether, in light of the Appeals Court’s October 15, 2009 decision in Taylor v. Beaudry, 75 Mass. App. Ct. 411 (2009), the motion judge properly applied Castenholz v. Calm, 21 Mass. App. Ct. 758 (1986) in allowing summary judgment for the defendants.
In March of 2007, the plaintiffs entered into a one-year residential lease with the defendants, and gave them a security deposit of $1,300.00. In an acknowledgment of receipt of the security deposit, the defendants recognized, “subject to damages prescribed by law,” their duty to return the deposit within thirty days after the termination of the tenancy, minus any reasonable amount deducted for damage caused by the plaintiffs. The defendants covenanted with the plaintiffs that, if a deduction were to be made, they would provide “an itemized list of damages, sworn to by [them] under the pains and penalties of perjury, itemizing in precise detail the nature of the damage and of the repairs necessary to correct it, and written evidence, such as estimates, bills, invoices or receipts, indicating the actual or estimated cost.” The defendants further promised that they would, “[a]s required by law,” place the deposit “in a separate, [i]nterest-bearing account.”
The deposit was not placed in a separate interest-bearing account located in Massachusetts.
In mid-January, 2008, the plaintiffs informed the defendants that they would be vacating the rental unit by the end of the lease term (February 29,2008). They actually vacated on February 14, 2008,5 and returned the keys to the defendants’ management office on February 28, 2008. Euridices A. Dolores averred that, after she and Richard J. Balboni had moved out, she contacted the defendants to ask why the *269security deposit had not been returned; and that the defendants informed her they were going on vacation and would give the plaintiffs their security deposit when they returned.6 In an envelope postmarked April 7,2008, which contained an undated letter, neither signed under the pains and penalties of perjury, nor containing receipts, bills, or estimates of damages, the defendants returned $1,169.03 of the security deposit and retained the balance for “minor repairs.” On April 14,2008, the plaintiffs, through counsel, sent defendants a G.L.c. 93A demand letter claiming that the defendants had violated the security deposit law by not properly depositing the security deposit, failing to provide an accounting of the repairs made, failing to sign the letter returning the partial security deposit refund under the pains and penalties of perjury, and failing to pay proper interest on the deposit. The demand letter stated that the damages totaled $4,595.97.7 By letter dated May 5, 2008, with a check enclosed, the defendants tendered $135.05 to the plaintiffs. That amount was stated to be the balance of the security deposit withheld ($130.97), plus interest ($4.08).8
The plaintiffs commenced this action on June 6, 2008. Summary judgment was allowed in favor of the defendants on February 13, 2009, and this appeal by the defendants followed.
Summary judgment shall be granted where there are no genuine issues of material fact and where the moving party is entitled to judgment as a matter of law. Mass. R. Civ. R, Rule 56(c); Cassesso v. Commissioner of Correction, 390 Mass. 419, 422 (1983). The moving party bears the burden of demonstrating, affirmatively, both the absence of a triable issue and his entitlement to judgment as a matter of law. Pederson v. Time, Inc., 404 Mass. 14, 16-17 (1989). All evidence must be viewed in the light most favorable to the nonmoving party. Williams v. Hartman, 413 Mass. 398, 401 (1992).
The applicable law in this case is found in G.L.c. 186, §15B. Section 15B(3)(a) requires that any security deposit received by a landlord be held in an account in a bank located within the Commonwealth; §15B(3) (b) provides that interest at a rate of five (5%) percent, or other lesser amount paid by the bank where the deposit is held, be paid on the security deposit if held by the landlord for one year or longer; §15B (4) mandates that the security deposit be returned to the tenant within 30 days after the termination of the tenancy; and §15B(4) (iii) requires that, if any deduction for repairs is made from the deposit, the landlord must furnish an “itemized list of *270damages, sworn to by the [landlord] under pains and penalties of perjury, itemizing in precise detail the nature of the damages and of the repairs necessary to correct such damage, and written evidence, such as estimates, bills, invoices, or receipts, indicating the actual or estimated cost thereof.”
General Laws c. 186, §1533 (7) states that if the lessor violates certain provisions of §15B(6), including failing to place the deposit in an interest-bearing account in Massachusetts or failing to return the security deposit or the balance to which the tenant is entitled, plus interest, within 30 days after termination of the tenancy, “the tenant shall be awarded damages in an amount equal to three times the amount of such security deposit or balance thereof to which the tenant is entitled plus interest at the rate of five per cent from the date when such payment became due, together with court costs and reasonable attorney’s fees.” On the facts asserted by the plaintiffs, there is no dispute that their security deposit was not placed in a Massachusetts interest-bearing account, the security deposit was not returned within 30 days after the date of the termination of the tenancy, and the defendants failed to comply with statutory requirements for any deduction from the security deposit for damage. On these facts, a literal reading of §15B(7) would require a court to assess damages against the defendants. The motion judge found that Castenholz, supra, holds otherwise. We disagree.
The Appeals Court stated in Castenholz-.
Subsection (7) imposes the treble damages penalty not for a violation of subsection (3) (a), but for a violation of subsection (6) (a). Subsection (3) (a) establishes the duty to place the security deposit in an escrow account. Subsection (6) (a) declares a forfeiture of the landlord’s right to retain the security deposit if he has failed to comply with the specified duty imposed on him by subsection (3) (a). The forfeiture of the right to retain the deposit means that the landlord is under a duty to return the deposit to the tenant on demand. A violation of subsection (6) (a) occurs if the landlord fails to return the deposit when requested. In that event the treble damages provisions of subsection (7) come into play.
Section 15B, as thus construed, is not a minefield of potential multiple penalties for a landlord who makes an innocent mistake. Any one of the violations of duty listed in subsection (6) will entitle the tenant to immediate return of his entire deposit on request, regardless of whether the violation was innocent or wilful. If the landlord refuses to acknowledge his error and return the deposit, thus forcing the tenant to employ legal process to vindicate his rights, the landlord will be liable for treble damages, interest, costs, and attorney’s fees. The purpose of subsection (7) is not to pillory the landlord, but to make resort to litigation feasible for the tenants. Without subsection (7), normally “the legal expense of chasing a security deposit would be more than the amount of the deposit.” Where the landlord discovers or acknowledges his error and returns the deposit, and the tenant is not forced to resort to litigation to vindicate his rights, the multiple damages and attorney’s fees provisions of subsection (7) have no application. As thus understood, the purpose of § 15B is seen not to be arbitrar*271ily penal; rather, “the underlying goal” is to establish an “equitable relationship” between tenants and landlords (citations omitted).
Id. at 762-763.
In Taylor v. Beaudry, the Appeals Court acknowledged that Castenholz “could be read to suggest that treble damages under §15B(7) are unavailable anytime a landlord responds to a tenant’s demand and returns a security deposit before ‘litigation.’” Id. at 415. The Court explained, however, that this was not the holding of Castenholz. That case involved a violation of the §15B(3) (a) requirement that a security deposit be properly deposited, the forfeiture provision of §15B(6) (a) applicable when there is a demand during the tenancy for the return of the security deposit because of the absence of a proper deposit in compliance with §15B(3) (a); and the penalty provisions of §15B (7) given the absence of statutory guidance in §15B (6) (a) as to the timing of the return of the forfeited deposit before the end of the tenancy. The Appeals Court indicated in Taylor that the Castenholz decision allowed a “smooth application” of the penalty provisions of §15B (7). Id. at 416. If the return were made without forcing the tenant to “resort to litigation,” then the damages provisions of §15B(7) were unavailable. Id. at 415.
The Taylor Court distinguished the circumstances and issues in Castenholz from the situation in this case in which it is undisputed that the full security deposit was not returned within 30 days of the termination of the tenancy, whether measured from February 28, 2008 or March 8, 2008. Unlike the forfeiture brought about by the failure to make a proper deposit, §15B(6)(e) deals with the failure to make a timely return of the deposit upon the termination of the tenancy, and contains “its own compliance deadline: thirty days after the termination of the tenancy.” Id. at 416. Therefore, “the Castenholz framework is inapplicable” in this case, id., and the penalty provisions of §15B(7) are controlling in this situation, irrespective of whether the defendants made a timely return of the plaintiffs’ security deposit when notified of their error.
Left unresolved in Taylor is how the treble damages are to be measured. The damages provision of §15B(7) subjects a landlord to “damages in an amount equal to three times the amount of such security deposit or balance thereof to which the tenant is entitled,” plus interest, costs, and reasonable attorney’s fees. The Taylor Court noted that, although “[n]o appellate court has expressly construed the phrase ‘balance thereof to which the tenant is entitled,”’ id. at 417, the following alternative constructions were possible: (1) the “balance” to be trebled is the difference between the amount retained by the landlord and the amount that should have been returned; (2) the “balance” trebled is the difference between the amount the landlord returned within the 30-day period and the amount that the landlord should have returned; (3) where there exists a right to withhold some portion, then the amount trebled is the difference between the amount withheld and the amount that properly could have been withheld, if a timely return is made; and (4) where there exists no right to withhold any amount, the amount trebled is “the entire amount of the deposit, and the amount actually returned would be deducted from the trebled amount.” Id. at 417-418.
The proper calculation of damages, as in Taylor, has not been addressed on this appeal. The parties may address that issue upon the return of this case to the trial court.
*272The allowance of summary judgment for the defendants on counts 1, 2, and 3 is reversed, and summary judgment on those counts is to be entered for the plaintiffs. The case is returned to the trial court for an assessment and award of damages, attorney’s fees, and costs to the plaintiffs on counts 1, 2, and 3, and for the adjudication of all remaining complaint counts and counterclaims.
So ordered.
The record indicates that the defendants filed a Mass. R. Civ. P., Rule 12(b) (6) motion to dismiss for failure to state a claim upon which relief could be granted. The record appendix on this appeal indicates that an affidavit of Cheryl Gustafson, with supporting exhibits, and a memorandum of law were attached to the dismissal motion. It is not clear what exhibits were attached to the motion because the appendix contains only the motion itself. However, the parties have included in the appendix a number of exhibits that apparently were before the motion judge. Also included in the appendix is an affidavit of plaintiff Euridices A Dolores stated to have been made in opposition to the defendants’ motion to dismiss. “Generally, if matters outside the pleadings are considered in deciding a Rule 12(b) (6) dismissal motion, the motion is treated as one for summary judgment under Mass. R. Civ. P., Rule 56 and each party is afforded a ‘reasonable opportunity’ to prepare and present pertinent material.” Norfolk Fin. Corp. v. MacDonald, 2003 Mass. App. Div. 153, 156, citing Gomes v. Metropolitan Prop. & Cas. Ins. Co., 45 Mass. App. Ct. 27, 32 (1998). Neither party has challenged the propriety of the motion judge’s treatment of the defendants’ Rule 12(b) (6) motion as one for summary judgment. In any event, to establish error, a party must show prejudice. White v. Peabody Constr. Co., 386 Mass. 121, 126-128 (1982). No prejudice is shown on this record.
Having reviewed plaintiffs’ complaint, defendants’ answer and counterclaims, and the motion judge’s ruling, we must conclude, although no party has raised the issue, that this appeal is interlocutory. The motion judge did not explicitly rule on plaintiffs' G.L.c. 93A claim (count 4). Fairly read, the claims adjudicated by summary judgment involved counts 1-3 of plaintiffs’ complaint alleging violations of the security deposit law, i.e., failure to return in Sill the security deposit (count 1), failure to return the deposit within thirty days of the termination of the tenancy (count 2), and failure to pay interest on the security deposit (count 3). Each of those counts sets forth the plaintiffs’ contention that they were entitled to three times the amount of the security deposit, plus costs and attorney’s fees, pursuant to G.L.c. 186, §15B(7). Moreover, although a motion to dismiss defendants’ counterclaims for breach of contract was filed, it does not appear that those counterclaims were adjudicated. Ordinarily, this appeal would be dismissed as premature under “the basic rule that interlocutory orders are not subject to appellate review until the entire case has been disposed of at the trial level.” Chavoor v. Lewis, 383 Mass. 801, 803 (1981). However, the parties have fully briefed the application of Castenholz v. Calm, 21 Mass. App. Ct. 758 (1986) to this case, and we elect to address the issues presented.
In his memorandum of decision, the motion judge identified a factual dispute as to when the plaintiffs vacated the premises. Cheryl Gustafson stated in her affidavit that the plaintiffs did not vacate until March 8, 2008. However, consistent with the applicable standard, we construe the facts in the light most favorable to the plaintiffs. Williams v. Hartman, 413 Mass. 398, 401 (1992); Patsos v. First Albany Corp., 48 Mass. App. Ct. 266, 267 (1999).
Cheryl Gustafson, in her affidavit, claims that she was given permission by the plaintiffs, on March 29, 2008, to return the security deposit by way of a check, instead of a wire transfer into the plaintiffs’ account, when they returned from vacation. The motion judge adopted this version. We adopt the plaintiffs’ version. See note 5, supra.
That total was based on the following separate demand calculations: (1) $1,300.00 for the return of the security deposit, (2) triple damages of $3,900.00 for violating G.L.c. 186, §15B(6), (3) $65.00 in interest due on the security deposit, and (4) $500.00 in legal fees.
The parties have not raised any issue about the interest. We deem the issue waived.