moved deckFns and cardFns here