         
         let size = sizeForitemAtIndexPath(item, section: section)
         let y = scrollDirection == .horizontal ? yCellOffset + sectionInset.top : yCellOffset
-        return (item, section, xCellOffset + stride, y, size.width, size.height)
+        return (item, section, xCellOffset + xStride, y, size.width, size.height)
     }
     
     func determineToApplySupplementaryAttribs(_ item: Int, section: Int) -> (Int, Int, CGFloat, CGFloat, CGFloat, CGFloat)? {

        yCellOffset = 0
        contentHeight = 0
        contentWidth = 0
        stride = 0
        firstContentOffsetWasSet = false
    }
}

    }
    
    func configureVerticalLayout() {
        var virtualSection = 0
        var totalDayCounter = 0
        let fullSection = numberOfRows * maxNumberOfDaysInWeek
        
        xCellOffset   = sectionInset.left
        yCellOffset   = sectionInset.top
        contentHeight = sectionInset.top
        endSeparator  = sectionInset.top + sectionInset.bottom
        
        for aMonth in monthInfo {
            for numberOfDaysInCurrentSection in aMonth.sections {
                // Generate and cache the headers
                if let aHeaderAttr = determineToApplySupplementaryAttribs(0, section: virtualSection) {
                    headerCache[virtualSection] = aHeaderAttr
                    if strictBoundaryRulesShouldApply {
                        contentHeight += aHeaderAttr.5
                        yCellOffset += aHeaderAttr.5
                    }
                }
                // Generate and cache the cells
                for dayCounter in 1...numberOfDaysInCurrentSection {
                    totalDayCounter += 1
                    guard let attribute = determineToApplyAttribs(dayCounter - 1, section: virtualSection) else { continue }
                    if cellCache[virtualSection] == nil { cellCache[virtualSection] = [] }
                    cellCache[virtualSection]!.append(attribute)
                    lastWrittenCellAttribute = attribute
                    xCellOffset += attribute.width
                    
                    if strictBoundaryRulesShouldApply {
                        if dayCounter == numberOfDaysInCurrentSection || dayCounter % maxNumberOfDaysInWeek == 0 {
                            // We are at the last item in the
                            // section && if we have headers
                            
                            xCellOffset = sectionInset.left
                            yCellOffset += attribute.height
                            contentHeight += attribute.height
                            
                            if dayCounter == numberOfDaysInCurrentSection {
                                yCellOffset   += sectionInset.top
                                contentHeight += sectionInset.top
                                sectionSize.append(contentHeight - sectionInset.top)
                            }
                        }
                    } else {
                        if totalDayCounter % fullSection == 0 {
                            
                            yCellOffset += attribute.height + sectionInset.top
                            xCellOffset = sectionInset.left
                            contentHeight = yCellOffset
                            sectionSize.append(contentHeight - sectionInset.top)
                            
                        } else {
                            if totalDayCounter >= delegate.totalDays {
                                yCellOffset += attribute.height + sectionInset.top
                                contentHeight = yCellOffset
                                sectionSize.append(contentHeight - sectionInset.top)
                            }
                            
                            if totalDayCounter % maxNumberOfDaysInWeek == 0 {
                                xCellOffset = sectionInset.left
                                yCellOffset += attribute.height
                            }
                        }
                    }
                }
                virtualSection += 1
            }
        }
        contentWidth = self.collectionView!.bounds.size.width
