finishes card matching functionality