resizing window not only on load