added code that closes the open windows in interact.cpp