         firebaseReference.child("game").observeSingleEvent(of: .value, with: { (snapshot) in
             // Get all the games
             //print(snapshot)
+            self.games = [Game]()
             let value = snapshot.value as? NSDictionary//[String:AnyObject]//NSDictionary
             
             for (key, val) in value! {

                if (self.userID != newGame.organizerUid) {

                    if !(newGame.confirmedPlayers.contains(self.userID!)) {

                        self.games.append(newGame)
                    }


                newGame.latitude = Double(temp!)
                temp = location.value(forKey: "longitude") as! String?
                newGame.longitude = Double(temp!)
                let confirmedPlayers = dict.value(forKey: "confirmedPlayer") as? [String: AnyObject]
                
                if confirmedPlayers != nil {
                    for i in confirmedPlayers! {
                        let value = i.value
                        
                        newGame.confirmedPlayers.append(value["id"]! as! String)
                        
                        
                    }
                }
