finally got the creation of the cards to work