Refactored code by adding a secondAttemeptCheckMatch methods