added win checking