Added redraw loop