outsourced method for redrawing