made redrawScreen more efficient