working on win logic