get the window to show and close