changed loops from deck.length to cardCount