     // MARK: Table delegate methods
   override func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {
     if let cell = tableView.cellForRowAtIndexPath(indexPath) {
-      
-      switch indexPath.row {
-        
-      case (0):
-        row0item.checked = !row0item.checked
-        
-      case (1):
-        row1item.checked = !row1item.checked
+       let checklistItem = checkListItems[indexPath.row]
+      checklistItem.checked = !checklistItem.checked
 
-      case (2):
-        row2item.checked = !row2item.checked
-        
-      case (3):
-        row3item.checked = !row3item.checked
-        
-      case (4):
-        row4item.checked = !row4item.checked
-      default: break
-
-      }
         configureCheckmarkForCell(cell, indexPath: indexPath)
       
     }


class ChecklistViewController: UITableViewController {
  
  var row0item: ChecklistItem
  var row1item: ChecklistItem
  var row2item: ChecklistItem
  var row3item: ChecklistItem
  var row4item: ChecklistItem
  
  required init?(coder aDecoder: NSCoder) {
    row0item = ChecklistItem()
    row0item.text = "Walk the fish."
    row0item.checked = false

    row1item = ChecklistItem()
    row1item.text = "Massage my neck."
    row1item.checked = false
    
    row2item = ChecklistItem()
    row2item.text = "Learn singing."
    row2item.checked = false
    
    row3item = ChecklistItem()
    row3item.text = "ASMR practice."
    row3item.checked = false
    
    row4item = ChecklistItem()
    row4item.text = "Eat File Wellington."
    row4item.checked = false
    
    super.init(coder: aDecoder)
    

  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCellWithIdentifier("ChecklistItem", forIndexPath: indexPath)
    let checklistItem = checkListItems[indexPath.row]
    
    let label = cell.viewWithTag(1000) as? UILabel
    label?.text = checklistItem.text
    
    configureCheckmarkForCell(cell, indexPath: indexPath)
    
