updated code to detect duplicate guess and minified