made getCard function more generic to reuse for came