remove some extraneous computations, reorganize
performance fix: only redraw parts of region