refactored win_check method