modified window.cc