extract card type