add redraw javascript