small refactor on win check