winning state implemented