legalize in mainwin