updated check for win code