reimplemented window.cpp windowsystem