win logic working