let classRowIndex = 4;
let teacherIndex = 18;
let teachers = [];
let teacherName;
let totalTeachers = document.querySelectorAll('.datadisplaytable tbody tr').length;

while (totalTeachers >= classRowIndex) {
  let isPrimaryTeacherIndex;

  teacherName = document.querySelector('.datadisplaytable tbody tr:nth-child('
                                       + classRowIndex++ + ') td:nth-child(' + teacherIndex + ')').innerText;
  isPrimaryTeacherIndex = teacherName.indexOf('(');
  if (isPrimaryTeacherIndex > -1) {
    teacherName = teacherName.slice(0, isPrimaryTeacherIndex - 1);
  }
  teachers.push(teacherName);
}

let column = document.createElement('th');
// let columnList = Array.prototype.slice.call(document.querySelectorAll('.datadisplaytable tbody tr:nth-child(3) td'));
let ratingText = document.createTextNode('lkdjflkjdfj');
column.appendChild(ratingText);
column.classList.add('ddheader');
// let length = columnList.length;
let c;

let parent = document.querySelector('.datadisplaytable tbody tr:nth-child(3)');
console.log(parent);
c = parent.querySelector('th:nth-child(18)');
console.log(c);
parent.insertBefore(column, c);

@@ -621,93 +621,219 @@
 et c
-olumn = document.createElement('th');%0A// let columnList = Array.prototype.slice.call(
+hild;%0Alet parent;%0Alet column;%0Alet ratingText;%0A%0A%0Acolumn = document.createElement('th');%0AratingText = document.createTextNode('COLUMN');%0Acolumn.appendChild(ratingText);%0Acolumn.classList.add('ddheader');%0A%0Aparent = 
 docu
@@ -842,35 +842,32 @@
 nt.querySelector
-All
 ('.datadisplayta
@@ -895,20 +895,138 @@
 d(3)
- td'));%0Alet 
+');%0Achild = parent.querySelector('th:nth-child(19)');%0Aparent.insertBefore(column, child);%0A%0Acolumn = document.createElement('td');%0A
 rati
@@ -1063,19 +1063,14 @@
 de('
-lkdjflkjdfj
+COLUMN
 ');%0A
@@ -1129,65 +1129,339 @@
 ('dd
-header');%0A// let length = columnList.length;%0Alet c;%0A%0Alet 
+default');%0A%0A%0Aparent = document.querySelector('.datadisplaytable tbody tr:nth-child(4)');%0Achild = parent.querySelector('td:nth-child(18)');%0Aparent.insertBefore(column, child);%0A%0Acolumn = document.createElement('td');%0AratingText = document.createTextNode('COLUMN');%0Acolumn.appendChild(ratingText);%0Acolumn.classList.add('dddefault');%0A%0A
 pare
@@ -1530,36 +1530,19 @@
 ild(
-3
+5
 )');%0Ac
-onsole.log(parent);%0Ac
+hild
  = p
@@ -1555,33 +1555,33 @@
 querySelector('t
-h
+d
 :nth-child(18)')
@@ -1586,24 +1586,8 @@
 ');%0A
-console.log(c);%0A
 pare
@@ -1611,11 +1611,14 @@
 olumn, c
+hild
 );
-%0A

add new column (rough)