improve redrawing