starting the card function