   var headerHeight: CGFloat = 88
 
   let dayHeaderView = DayHeaderView()
-  let timelinePager = PagingScrollView()
+  let timelinePager = PagingScrollView<TimelineContainer>()
 
   var currentDate = NSDate().dateOnly()
 

}

extension DayView: PagingScrollViewDelegate {
  func viewRequiresUpdate(view: UIView, scrollDirection: ScrollDirection) {
    guard let container = view as? TimelineContainer else { return }
    let timeline = container.timeline

    let amount = scrollDirection == .Forward ? 1 : -1
    timeline.date = currentDate.dateByAddingDays(amount)
    updateTimeline(timeline)
  }

  func scrollviewDidScrollToView(view: UIView) {
    guard let container = view as? TimelineContainer else { return }
    currentDate = container.timeline.date
    dayHeaderView.selectDate(currentDate)
  }
}

  func dateHeaderDateChanged(newDate: NSDate) {
    //TODO: refactor
    if newDate.isEarlierThan(currentDate) {
     let timelineContainer = timelinePager.reusableViews.first!
      timelineContainer.timeline.date = newDate
      updateTimeline(timelineContainer.timeline)
      timelinePager.scrollBackward()

    } else if newDate.isLaterThan(currentDate) {
      let timelineContainer = timelinePager.reusableViews.last!
      timelineContainer.timeline.date = newDate
      updateTimeline(timelineContainer.timeline)
      timelinePager.scrollForward()
