Update card matching algorithm