                 positionY += kCellHeight
             }
             
+            let footerAttribute:UICollectionViewLayoutAttributes = UICollectionViewLayoutAttributes(
+                forSupplementaryViewOfKind:UICollectionElementKindSectionFooter,
+                with:sectionIndexPath)
+            footerAttribute.frame = CGRect(
+                x:0,
+                y:positionY,
+                width:0,
+                height:kFooterHeight)
+            footerLayoutAttributes.append(footerAttribute)
+            
+            positionY += headerHeight
             section += 1
         }
         

        super.prepare()
        
        headerLayoutAttributes = []
        cellLayoutAttributes = []
        
        var section:Int = 0

    
    override func layoutAttributesForSupplementaryView(ofKind elementKind:String, at indexPath:IndexPath) -> UICollectionViewLayoutAttributes?
    {
        let listAttributes:[UICollectionViewLayoutAttributes]
        
        if elementKind == UICollectionElementKindSectionHeader
        {
            listAttributes = headerLayoutAttributes
        }
        else
        {
            listAttributes = footerLayoutAttributes
        }
        
        for layoutAttribute:UICollectionViewLayoutAttributes in listAttributes
        {
            if layoutAttribute.indexPath.section == indexPath.section
            {
