Added redraw function