implement gInOut in mainWin