refactored a bit
add thead and tbody to table