Add cardFromString and cardsFromString functions