refactored naming variables (thead -> tHead, tbody -> tBody)