added a reset_matching function when cards are discarded