         guard let dataSource = feedDataSource else {
             return .zero
         }
-        let screenRect = UIScreen.main.bounds
-        let screenWidth = screenRect.size.width
-        let cellWidth = screenWidth / CGFloat(dataSource.getCellsPerRow())
-        let size = CGSize(width: cellWidth, height: cellWidth)
-        return size
+        let width = collectionView.frame.size.width
+        let cellWidth = width / CGFloat(dataSource.getCellsPerRow())
+        return CGSize(width: cellWidth, height: cellWidth)
     }
 
     open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {

        }
    }

    private final func newCellVisible(at:Int) {
        if at < cellData.count {
            // set cell with image
            cellData[at].cellDidBecomeVisible()
        }
    }
}

    private let refreshControl = UIRefreshControl()
    private var start = -1
    private var end = -1

    /**
        Call this to load new images. Optionally specify a `ImageLoadDelegate`
