adopt for_each algorithm to "CardDeck"