refactoring to account for guess containing same number more than once