added determine win and it works