makes setTableHead function