refact htmltable