implemented redraw