cards.c version 2