working on getCardData method in index.js