adding code to win the card