repaints properly