     }
 
     override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        print(self.items.count)
-        return self.items.count
+        return sampleItems.count
     }
 
     

        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier,
                                                 for: indexPath) as! ListingsTableViewCell
        // Configure the cell...
        cell.itemLabel?.text = sampleItems[indexPath.row]
        cell.thumbnailImageView?.image = UIImage(named: restaurantImages[indexPath.row])
        return cell
    }
}

    var restaurantImages = ["cafedeadend.jpg", "homei.jpg", "teakha.jpg", "cafeloisl.jpg", "petiteoyster.jpg", "forkeerestaurant.jpg"]
    var ref: FIRDatabaseReference!
    var refHandle: FIRDatabaseHandle?
    var itemsRef: FIRDatabaseReference!
    var userRef: FIRDatabaseReference!
    var items: JSON!
    var key: String!

    override func viewDidLoad() {
        super.viewDidLoad()
        self.ref = FIRDatabase.database().reference()
        self.itemsRef = ref.child("items")
        self.userRef = ref.child("users")
        
        self.refHandle = itemsRef!.observe(.childAdded, with: { (snapshot) -> Void in
            
            let jsonSnap = JSON(snapshot.value!)
            self.key = snapshot.key
            self.items = jsonSnap
            
            print("ITEMS \(self.items!)")
            print("key \(snapshot.key)")
            print("self \(self.items["seller"])")
            
//            print("KEY \(snapshot.key)")
//            print("HERE IS THE JSON \(jsonSnap)")
//            self.dict.append(["key": jsonSnap])
//            
//            print("listings \(self.dict)")
//            print("COUNT \(self.dict.count)")
            
            //            for item in snapshot.children.allObjects as! [FIRDataSnapshot] {
            ////                let seller = item.value!["seller"] as? String
            //
            //                print("ITEM \(item)")
            //                self.items.append(item)
            //
            //                print("COUNT \(self.items.count)")
            
            //                print("Here is the snapshot \(jsonSnap["items"])")
            //                let child = JSON(item)
            //                print("Child is \(child)")
            //                self.items.append(child)
            
        })
        
        self.tableView.reloadData()

    }
    
    override func viewWillAppear(_ animated: Bool) {
        
