   }
   
   func numberOfItemsInSection(section:Int) -> Int {
-    return recordsOfIndexPath(section).count
+    return recordsOfSection(section).count
   }
   // MARK: DataSource
   

  func deleteRecordAtIndexPath(indexPath:NSIndexPath){
      let record = recordAtIndexPath(indexPath)
      ClockRecordService.sharedService.delete(record)
      collectionView?.deleteItemsAtIndexPaths([indexPath])
      loadData()
  }

    return recordDateRanges[section]
  }
  
  func recordsOfSection(section:Int) -> [ClockRecord]{
    return recordDateRangeAtSection(section).records
  }
  
  func recordAtIndexPath(indexPath:NSIndexPath) -> ClockRecord{
    let records = recordsOfSection(indexPath.section)
    return records[indexPath.item]
  }
  
