restructuring the index DOM