handling window resizing works now