Updated how card type is determined