can now close the window. Practical from command prompt
moved around some functions