removed win_per global variable