     }
     
     override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
-        API.currentGroup = visibleGroups[indexPath.item]
+        API.currentGroup = visibleGroups()[indexPath.item]
         let vc = GroupViewController()
 
         vc.delegate = self

    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

        let group = visibleGroups[indexPath.item]

        let cell = UITableViewCell(style: .Subtitle, reuseIdentifier: "groupCell")
        cell.textLabel?.text = group.description



    override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
        
        var archivedStatus = visibleGroups()[indexPath.item].archived

        visibleGroups()[indexPath.item].archived = !archivedStatus
        API.putGroup(visibleGroups()[indexPath.item])
        .onSuccess {
            group in
            self.tableView.reloadData()
        }
        .onFailure {
            err in
            self.visibleGroups()[indexPath.item].archived = archivedStatus
        }
    }

