changed to use timer event for redraw