 
 public  let CHTCollectionElementKindSectionHeader = "CHTCollectionElementKindSectionHeader"
 public  let CHTCollectionElementKindSectionFooter = "CHTCollectionElementKindSectionFooter"
-class CHTCollectionViewWaterfallLayout: UICollectionViewLayout {
-    var columnCount: Int {
-        didSet {
-            invalidateLayout()
-        }}
-
-    var minimumColumnSpacing: CGFloat {
-        didSet {
-            invalidateLayout()
-        }}
-
-    var minimumInteritemSpacing: CGFloat {
-        didSet {
-            invalidateLayout()
-        }}
-
-    var headerHeight: CGFloat {
-        didSet {
-            invalidateLayout()
-        }}
-
-    var footerHeight: CGFloat {
-        didSet {
-            invalidateLayout()
-        }}
-
-    var sectionInset: UIEdgeInsets {
-        didSet {
-            invalidateLayout()
-        }}
-
-
-    var itemRenderDirection: CHTCollectionViewWaterfallLayoutItemRenderDirection {
+public class CHTCollectionViewWaterfallLayout: UICollectionViewLayout {
+    public var columnCount: Int {
+        didSet {
+            invalidateLayout()
+        }}
+
+    public var minimumColumnSpacing: CGFloat {
+        didSet {
+            invalidateLayout()
+        }}
+
+    public var minimumInteritemSpacing: CGFloat {
+        didSet {
+            invalidateLayout()
+        }}
+
+    public var headerHeight: CGFloat {
+        didSet {
+            invalidateLayout()
+        }}
+
+    public var footerHeight: CGFloat {
+        didSet {
+            invalidateLayout()
+        }}
+
+    public var sectionInset: UIEdgeInsets {
+        didSet {
+            invalidateLayout()
+        }}
+
+
+    public var itemRenderDirection: CHTCollectionViewWaterfallLayoutItemRenderDirection {
         didSet {
             invalidateLayout()
         }

}


@objc protocol CHTCollectionViewDelegateWaterfallLayout: UICollectionViewDelegate {

    func collectionView (_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout,
                         sizeForItemAtIndexPath indexPath: IndexPath) -> CGSize

     *
     *  @return index for the shortest column
     */
    public func shortestColumnIndexInSection (_ section: Int) -> Int {
        var index = 0
        var shorestHeight = CGFloat.greatestFiniteMagnitude
        for (idx, height) in self.columnHeights[section].enumerated() {
