             return MyDataProvider() //return a new instance since class vars not supported yet
         }
         
-        func requestData(offset:Int, size:Int, listener:(MyItem[]) -> ()) {
+        func requestData(offset:Int, size:Int, listener:([MyItem]) -> ()) {
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
                 //simulate delay
                 sleep(2)
                 
                 //generate items
-                var arr:MyItem[] = []
+                var arr:[MyItem] = []
                 for i in offset...(offset + size) {
-                    arr += MyItem(name: "Item " + String(i))
+                    arr.append(MyItem(name: "Item \(i)"))
                 }
                 
                 //call listener in main thread

            self.setLoadingState(true)

            MyDataProvider.getInstance().requestData(offset, size: size,
                listener: {(items:ViewController.MyItem[]) -> () in
                    
                    for item:MyItem in items {
                        self.items += item
                    }
                    
                    self.tableView.reloadData()

        }
    }
    
    override func scrollViewDidScroll(scrollView: UIScrollView) {
        let currentOffset = scrollView.contentOffset.y
        let maximumOffset = scrollView.contentSize.height - scrollView.frame.size.height
        
