simplified version with win logic