updating the dom in the worst way possible