Updated add_window.py to version 2.1