rewrite how divs are created