fixed dom thrashing for vast performance increase