implement window resizing (again)