     var fontName: String {
         return fontFamily + "-" + fontWeight
     }
+    
+    func readBackground() -> UIImage? {
+        guard let documentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { return nil }
+        return UIImage(contentsOfFile: documentDirectory.appendingPathComponent("Background.png").path)
+    }
+    
+    func writeBackground() {
+        guard let documentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { return }
+        if let backgroundImage = backgroundImage {
+            try? backgroundImage.pngData()?.write(to:  documentDirectory.appendingPathComponent("Background.png"))
+        } else {
+            try? FileManager.default.removeItem(at: documentDirectory.appendingPathComponent("Background.png"))
+        }
+    }
 }

        didSet { UserDefaults.standard.set(textColor, forKey: "Text Color") }
    }
    
    func reset() {
        backgroundColor = .countdownBackground
        backgroundImage = nil

    var backgroundColor = UserDefaults.standard.color(forKey: "Background Color") ?? .countdownBackground {
        didSet { UserDefaults.standard.set(backgroundColor, forKey: "Background Color") }
    }
    var backgroundImage = UserDefaults.standard.image(forKey:"Background Image") {
        didSet { writeBackground() }
    }
    var fontFamily = UserDefaults.standard.string(forKey: "Font Family") ?? "AvenirNext" {
        didSet { UserDefaults.standard.set(fontFamily, forKey: "Font Family") }
