generating thead