fixed 'off-by-one' error for the number of cards needed to match