Trying to implement identifyWin function.