adding the first version of cards.c to the repo