improve speed by preventing unneeded redraws