         var lastGameSlot:GameSlot = GameSlot(withDictionary:[:])
 
         // gets the content of the current game slot
-        if let gameSlotList = allGameSlots["list"] as? [AnyObject] {
-
-            let slotNumber = GamePlay.getLastGameSlotNumber(allGameSlots: allGameSlots)
-
-            if let singleSlotDictionary = gameSlotList[slotNumber] as? [String:AnyObject] {
+        if let gameSlotList = allGameSlots["list"] as? [String:AnyObject] {
+
+            let slotKey = GamePlay.getLastGameSlotKey(allGameSlots: allGameSlots)
+
+            if let singleSlotDictionary = gameSlotList[slotKey] as? [String:AnyObject] {
 
                 lastGameSlot = GameSlot(withDictionary:singleSlotDictionary)
 


                    } else if (isPlayer0SlotFull && isPlayer1SlotFull) {

                        // TODO: move to next slot

                        self.keepPlayer0AndWaitForPlayer1(with: playerReferences)


                        // TODO

                    }

                    referenceToAllGameSlots.child("lastSlot").setValue(["value": self.slotKey])

                }
        })
    }
