
358 N.W.2d 511 (1984)
Glenn MITCHELL and Mike Neuwirth, Plaintiffs and Appellees,
v.
Richard PREUSSE, Defendant and Appellant.
Civ. No. 10744.
Supreme Court of North Dakota.
November 28, 1984.
*513 Michael C. O'Neel, Fargo, attorney for plaintiffs and appellees; submitted on brief.
Ramlo Law Office, Fargo, attorney for defendant and appellant; submitted on brief.
SAND, Justice.
Richard Preusse (Preusse) appealed a Cass County Court judgment awarding Glenn Mitchell and Mike Neuwirth (Mitchell and Neuwirth) damages for breach of an apartment rental contract.
In late July 1983 Mitchell and Neuwirth arrived in Fargo from their homes in Minnesota to obtain housing while they attended college. They located an apartment Preusse owned which at that time he was remodeling. Doors needed to be hung, windows repaired, a refrigerator installed, and the apartment cleaned. However Mitchell and Neuwirth were not moving to Fargo until September 1 and Preusse promised them the apartment would be ready for occupancy by that time. Consequently, on 28 July 1983 Mitchell and Neuwirth signed a three-month lease with Preusse and paid him $300 for the first month's rent and $300 as a security deposit.
On 2 September 1983 Mitchell and Neuwirth arrived in Fargo and discovered the remodeling had not been completed and the apartment was in substantially the same condition it was when they had signed the lease a month earlier. Preusse indicated the apartment would be ready for occupancy by 7 September, the day before Mitchell and Neuwirth's college classes started. Mitchell and Neuwirth left some furniture and boxes in the apartment and returned home.
On 7 September Mitchell arrived in Fargo with some furniture but again discovered the apartment was in the same state as it had been a week earlier. Unable to move into the apartment, Mitchell stayed in a motel that night. The following day Mitchell and Neuwirth located another apartment, terminated their lease with Preusse and requested him to return their rental payment and security deposit. Preusse consented to the cancellation of the lease but failed to return the rental payment or security deposit.
Mitchell and Neuwirth sued Preusse in small claims court but Preusse removed the case to Cass County court for a bench trial. The Cass County court concluded Preusse breached the rental contract by failing to have the apartment ready for occupancy by 1 September 1983 and awarded Mitchell and Neuwirth $300.00 for their rental payment. The court further concluded Preusse withheld Mitchell and Neuwirth's security deposit without reasonable justification and awarded Mitchell and Neuwirth treble damages of $900.00. NDCC § 47-16-07.1(3). Preusse appealed.
North Dakota Century Code § 47-16-13.1(1)(b) required Preusse, as a landlord of a residential dwelling unit, to do whatever was necessary to maintain the apartment in a fit and habitable condition. The trial judge determined the apartment was unrentable, i.e., uninhabitable, and that Preusse failed to make it habitable within a reasonable time. See NDCC § 47-16-13.1(2). The trial judge concluded this constituted a breach of the rental contract by Preusse. These are findings of fact and under North Dakota Rule of Civil Procedure 52(a) such findings will not be overturned unless we are left with a definite and firm conviction a mistake has been made. Weiss v. Anderson, 341 N.W.2d *514 367, 369 (N.D.1983). We conclude the trial court's determination that Preusse had breached the rental contract is not clearly erroneous and therefore it is affirmed.
Preusse contended that Mitchell and Neuwirth waived the breach of the rental contract by allowing him time from 1 September to 8 September to make the apartment habitable and also by storing furniture and boxes in the apartment. We find this argument unconvincing and without merit. Mitchell and Neuwirth were required by NDCC § 47-16-13.1(2) to give Preusse a reasonable time to make the apartment habitable. Also, Mitchell and Neuwirth's storage of some furniture and boxes in the apartment did not constitute an intentional election to waive Preusse's breach and continue under the lease. See Marchand v. Perrin, 19 N.D. 794, 124 N.W. 1112 (1910).
Finally, Preusse contended that there was insufficient evidence for the trial court to conclude he had withheld Mitchell and Neuwirth's security deposit without reasonable justification. NDCC § 47-16-07.1(3) provides a lessor is liable for treble damages for any security deposit withheld without reasonable justification. The determination if the security deposit is withheld unreasonably is a question of fact and will not be overturned unless clearly erroneous. Weiss v. Anderson, supra. Preusse has offered no argument or authority to support his position or to convince us we should second-guess the trial court's conclusion that he unreasonably withheld the security deposit and therefore the judgment is affirmed.
All other issues raised by Preusse, including his contention that NDCC § 47-16-07.1(3) is unconstitutional as being void for vagueness, are meritless.
The seemingly ad hoc and unsupported nature of Preusse's arguments forces us to question the motivation behind this appeal. The proper function of an appeal is to convince the appellate court that the decision of the trial court should be reversed or rectified. Consequently, while appeals must by necessity test the validity of established legal principles and seek the adoption of new legal propositions, they must have some legitimate basis in fact and law. See North Dakota Code of Professional Responsibility DR 7-102(A)(2); EC 7-4; EC 7-22. Otherwise, courts and litigants, especially appellees, are forced to engage in the disposition, costly in terms of both time and money, of trifling and unnecessarily bothersome claims. See generally, NDCC § 31-11-05(23), (24).
North Dakota Rule of Appellate Procedure 38 acknowledges the necessity of controlling the appellate process by allowing this Court to award just damages and single or double costs, including reasonable attorney's fees, if an appeal is deemed frivolous. An appeal is frivolous if it is flagrantly groundless, devoid of merit, or demonstrates persistence in the course of litigation which could be seen as evidence of bad faith. Danks v. Holland, 246 N.W.2d 86, 91 (N.D.1976); see also Schnitker v. Schnitker, 646 S.W.2d 123, 126 (Mo.App.1983); Reid v. United States, 715 F.2d 1148, 1154 (7 Cir.1983).
In this case we have found Preusse's arguments, both factually and legally, so devoid of merit that he should have been aware of the impossibility of his success on appeal. Therefore, we must conclude that his appeal was frivolous and pursuant to NDRAppP 38 we award not only the regular costs on appeal to Mitchell and Neuwirth, but we also direct the trial court to award Mitchell and Neuwirth one-half of their attorney's fees not to exceed $500.00 to be paid by Preusse.
ERICKSTAD, C.J., and GIERKE, PEDERSON and VANDE WALLE, JJ., concur.
