         }
     }
 
+    func update(){
+        print("update")
+        let failureHandler: (Error) -> Void = { print($0.localizedDescription) }
+        self.swifter.getHomeTimeline(count: 20, success: { statuses in
+            print(statuses)
+            guard let tweets = statuses.array else { return }
+            self.tweets = tweets.map {
+                let tweet = Tweet()
+                tweet.text = self.attributedString($0["text"].string!)
+                tweet.name = $0["user"]["name"].string!
+                return tweet
+            }
+            
+            self.collectionView.reloadData()
+            
+        }, failure: failureHandler)
+    }
+    
     fileprivate func attributedString(_ string: String) -> NSAttributedString{
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineBreakMode = .byWordWrapping

                    }
                    
                    self.collectionView.reloadData()
                }, failure: failureHandler)
            }
        } else {

    @IBOutlet weak var collectionView: NSCollectionView!
    
    let useACAccount = true
    var swifter: Swifter!
    
    dynamic var tweets: [Tweet] = []
    
    fileprivate func configureCollectionView(){
