resizing window works