update repainting