     }
     
     func getDataFromServer() {
-        db.child("posts").queryOrdered(byChild: "timestamp").observe(.childAdded, with: { (snapshot) in
+        self.db = Database.database().reference()
+        self.db.child("posts").queryOrdered(byChild: "timestamp").observe(.childAdded, with: { (snapshot) in
             let posts = snapshot.value! as! NSDictionary
             
             let postIds = posts.allKeys

    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = feedTableView.dequeueReusableCell(withIdentifier: "FeedPostCell", for: indexPath) as! FeedTableViewCell
        
        cell.tapAction = { [weak self] (cell) in
            cell.likeButton.setImage(UIImage(named: "liked_like"), for: .normal)
        }
        cell.postSubtitle.text = postSubtitleArray[indexPath.row]
        cell.postAuthor.text = postAuthorArray[indexPath.row]

                self.postAuthorArray.append(singlePost["createdBy"] as! String)
                self.postSubtitleArray.append(singlePost["subtitle"] as! String)
                self.postImageURLArray.append(singlePost["image"] as! String)
                self.postUIDArray.append(id as! String)
                
                self.feedTableView.reloadData()
            }
