 class ViewController: UIViewController {
 
     @IBOutlet weak var collectionView: UICollectionView?
-    var array = PageableArray<LocalData>(capacity: 960, pageSize: 40)
+    static let kPageSize: UInt = 40
+    var array = PageableArray<LocalData>(capacity: 960, pageSize: ViewController.kPageSize)
     
     override func viewDidLoad() {
         super.viewDidLoad()

    
    func topUp() {
        
        let pageSize = UInt(40 * drand48())
        var data = [LocalData]()
        for _ in 0..<pageSize {
            data.append(genDataElement())
        }
        

    
    func reloadRandomRange() {
        
        var start : UInt = UInt(Double(array.count) * drand48())
        if start > array.count - ViewController.kPageSize {
            start = array.count - ViewController.kPageSize
        }
        
        let end = start + ViewController.kPageSize
        let range: Range<UInt> = start..<end
        loadContentForRange(range, pageSize: ViewController.kPageSize)
        collectionView?.reloadData()
        
        delay(3.0) {
