add mixed div, change function to put all line generate code together