redraw for resizing funtion