simplifying dom rendering