 import MaterialComponents
 
 class FPFeedViewController: MDCCollectionViewController, FPCardCollectionViewCellDelegate {
-  var uid: String!
+  lazy var uid = Auth.auth().currentUser!.uid
   var followingRef: DatabaseReference?
 
   lazy var ref = Database.database().reference()

    let likesQuery = self.likesRef.child(post.postID)
    likesQuery.observe(.value, with: {
      let count = Int($0.childrenCount)
      if post.likeCount != count || post.isLiked != $0.hasChild(self.uid!){
        post.likeCount = count
        post.isLiked = $0.hasChild(self.uid!)
        self.collectionView?.reloadItems(at: at)
      }
    })

      loadFeed()
      listenDeletes()
    } else {
      query = ref.child("feed").child(uid)
      // Make sure the home feed is updated with followed users's new posts.
      // Only after the feed creation is complete, start fetching the posts.
      updateHomeFeeds()
