replaced windows condition implementation