sorted out window resizing callback