win state added, bugs fixed