added check winning state
tweaked timeout for switching state