first changes for support of window-resizing