 
 class Checklist10ViewController: UITableViewController {
   
+  var items: [Checklist10Item]
   
   
-  var row0item: Checklist10Item
-  var row1item: Checklist10Item
-  var row2item: Checklist10Item
-  var row3item: Checklist10Item
-  var row4item: Checklist10Item
-  
   required init?(coder aDecoder: NSCoder) {
-    row0item = Checklist10Item()
+    items = [Checklist10Item]()
+    
+    let row0item = Checklist10Item()
     row0item.text = "Walk the dog"
     row0item.checked = false
-    row1item = Checklist10Item()
+    items.append(row0item)
+    let row1item = Checklist10Item()
     row1item.text = "Brush my teeth"
     row1item.checked = true
-    row2item = Checklist10Item()
+    items.append(row1item)
+    let row2item = Checklist10Item()
     row2item.text = "Learn iOS development"
     row2item.checked = true
-    row3item = Checklist10Item()
+    items.append(row2item)
+    let row3item = Checklist10Item()
     row3item.text = "Soccer practice"
     row3item.checked = false
-    row4item = Checklist10Item()
+    items.append(row3item)
+    let row4item = Checklist10Item()
     row4item.text = "Eat ice cream"
     row4item.checked = true
+    items.append(row4item)
+    
     super.init(coder: aDecoder)
   }
 

    
    if let label = cell.viewWithTag(1000) as! UILabel? {
      if indexPath.row == 0 {
        label.text = row0item.text
      } else if indexPath.row == 1 {
        label.text = row1item.text
      } else if indexPath.row == 2 {
        label.text = row2item.text
      } else if indexPath.row == 3 {
        label.text = row3item.text
      } else if indexPath.row == 4 {
        label.text = row4item.text
      }
    }
    

    var isChecked = false
   
    if indexPath.row == 0 {
      isChecked = items[0].checked
    } else if indexPath.row == 1 {
      isChecked = items[1].checked
    } else if indexPath.row == 2 {
      isChecked = items[2].checked
    } else if indexPath.row == 3 {
      isChecked = items[3].checked
    } else if indexPath.row == 4 {
      isChecked = items[4].checked
    }
    if isChecked {
      cell.accessoryType = .checkmark
