                     DispatchQueue.main.async(execute: { () -> Void in
                         var indexPathArray : [IndexPath] = []
                         let previousPage = self.latestPage - 1
-                        for var newRow = previousPage*20; newRow < self.latestPage*20; newRow++
+                        for newRow in previousPage*20..<self.latestPage*20
                         {
                             let indexPath = IndexPath(row: newRow, section: 0)
                             indexPathArray.append(indexPath)

                    
                } else {
                    // okay the json object was nil, something went wrong. Maybe the server isn't running?
                    let jsonStr = NSString(data: data!, encoding: String.Encoding.utf8)
                    print("could not parse JSON: \(jsonStr)")
                    let alert = UIAlertController(title: "Alert", message: "Could not Parse Json", preferredStyle: UIAlertControllerStyle.alert)
                    alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.default, handler: nil))

        // with a valid row number thanks to the numberOfRowsInSection function above
        if let photoDict = getPhotoDictAtIndex(indexPath.row)
        {
            if let userDict = photoDict["user"] as? [AnyHashable:Any]
            {
                tableCell.userNameLabel.text = userDict["fullname"] as? String

