added SwitchToMainWindow keyword