working on the card generation