predict card type algorithm added